For example if i create app like travel guide and i would like to show the attraction place as a list
i'm new to Android. I would like to create a ListView which provide image and some data in each listitem. And after, i touch one of listitem, it will show full information both image and data. The problem now are:
-where can i store开发者_如何学JAVA image data? in Drawable? or etc. In case, there were a lot of place and i would like to update place more after that.
-Do i need to use SQLite for place's information?
-How should i deal with place's data such as Title, Address, Description? should i store it in XML resource?
-How do i combine both place's data and place image into a listView
Thanks so much for you kindness.
where can i store image data? in Drawable? or etc. In case, there were a lot of place and i would like to update place more after that.
You can store the images related to the app in drawables(logo, icons etc). If the app have too many images or would have too many images in future you should consider building a web service and download them when necessary(for example while being searched). You wouldn't want your application to be heavyweight.
Do i need to use SQLite for place's information?
I would suggest you should. Thus it gives an easy way to structure the data and also helps to buffer it for offline use.
How should i deal with place's data such as Title, Address, Description? should i store it in XML resource?
Look at the answers to earlier 2 questions.
How do i combine both place's data and place image into a listView
how to design this UI
精彩评论