Вопрос

I am a new coder of android,now i need develop a android local reader(Some local article display on android app).I plan to use SharedPreferences to store the article,but i am not sure it is right or there has a better way to store the article.And i plan to use TextView to display the article,use ListView to display the title list. Am right?Or there has a better design to develop the app? Thanks in advance.

Это было полезно?

Решение

You should not use shared preferences to store large data.
You can use SQLite to store articles if you need to change it (add, delete, update articles or it's content).
You can also use assets if you do not plan to make changes in your articles.

I suggest you to read "Store Data" article from android developers portal it will help you to determine which storage data technology better suits for your purposes.

Другие советы

I plan use txt(assets) to store my article,because SQLite is too trouble and SharedPreferences is not fit to storage article.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top