[英]Where can i store default Image on internal storage in android
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. 我是Android新手。 I would like to create a ListView which provide image and some data in each listitem.
我想创建一个ListView,它在每个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 image data? -我可以在哪里存储图像数据? in Drawable?
在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? -我需要使用SQLite来获取地点信息吗?
-How should i deal with place's data such as Title, Address, Description? -我应该如何处理地点的数据,例如标题,地址,描述? should i store it in XML resource?
我应该将其存储在XML资源中吗?
-How do i combine both place's data and place image into a listView -如何将地点的数据和地点图像合并到listView中
Thanks so much for you kindness. 非常感谢您的好意。
where can i store image data?
我可以在哪里存储图像数据? in Drawable?
在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).
如果该应用程序包含太多图像,或者将来会包含太多图像,则应考虑构建Web服务并在必要时(例如在搜索时)下载它们。 You wouldn't want your application to be heavyweight.
您不希望您的应用程序笨重。
Do i need to use SQLite for place's information?
我需要使用SQLite来获取地点信息吗?
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?
我应该将其存储在XML资源中吗?
Look at the answers to earlier 2 questions. 查看前面两个问题的答案。
How do i combine both place's data and place image into a listView
如何将地点的数据和地点图像合并到listView中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.