Sunday, 15 March 2015

android - How to retrieve image from particular folder on sdcard to drawable folder in andriod at runtime? -



android - How to retrieve image from particular folder on sdcard to drawable folder in andriod at runtime? -

how can retrieve or re-create images particular folder in sdcard drawable folder @ run time in android. want show slideshow same in given link problem retrieving images drawable folder , want retrieve sdcard folder. beginner in android please help me.

here link : http://www.edumobile.org/android/android-development/image-gallery-example-in-android/

resources in res/drawable folder compiled , optimized. please take @ http://www.linuxtopia.org/online_books/android/devguide/guide/topics/resources/android_resources-i18n_creatingresources.html.

if want utilize images on sdcard have load them file. simple illustration be:

bitmap bitmap = bitmapfactory.decodefile(imagefile.getabsolutepath()); jpgview.setimagedrawable(bitmap);

in short. drawable folder treated in special way.

argument imagefile object of class file. http://developer.android.com/reference/java/io/file.html

variable jpgview instance of class imageview. example. http://developer.android.com/reference/android/widget/imageview.html

as far loop goes have iterate through files in folder. please consult documentation that.

android

No comments:

Post a Comment