android:show images in gallery

坚强是说给别人听的谎言 提交于 2020-01-24 11:43:09

问题


I am making an app in which i want to show list of images in my application in the manner , as the images are shown in gallery.The images will get load dynamically. Any help regarding this will be appreciated.


回答1:


You can use Android's MediaStore.images class to list all the images in the device

http://developer.android.com/reference/android/provider/MediaStore.Images.Media.html

You can get the solution from this tutorial

http://vikaskanani.wordpress.com/2011/07/20/android-custom-image-gallery-with-checkbox-in-grid-to-select-multiple/




回答2:


A nice and easy tutorial here : http://www.anddev.org/a_androidwidgetgallery_-_example-t332.html

if you want to load your images dynamically, create a function in the BaseAdapter and call it into the constructor to load them at the start of the view for example...



来源:https://stackoverflow.com/questions/9430738/androidshow-images-in-gallery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!