Question

Sorry Guys for all the vague questions. this is what i want to do. I want my app to randomly play images from SdCard and I want no user input after app is started. I have read lot of sdcard post but this is not same question. if this is possible please let me know how i go about this. I do not want any user input once the app is started it just plays images from sdcard. Thank you for your help. by the way i am trying to implement this using android.

Était-ce utile?

La solution

To show a slide show of images from your sdcard have a look at http://codinglookseasy.blogspot.in/2012/08/image-slide-show.html. Hope this helps you.

Autres conseils

Get the image paths into the sdcard and pass it to the gallery. You can follow this link for few more information http://raivoratsep.com/114/android-gallery-tutorial-working-example/

suppose you get the path name as

String pathName = "/sdcard/images/abc.jpg"; 

You can set the image to the image view as

Drawable d = Drawable.createFromPath(pathName);

hope this may help you

try creating another layout-land folder with the same xml file as in the layout folder. This will be used as the layout when the mobile is in the landscape mode. And to prevent crashing try to use

System.gc(); 

in the ondestroy() And i didnt find any difficulty by adding new images. They work fine for me.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top