I have some 50 images which i want to display on view dynamically by picking images from drawable folder .how should i use them without making use of switch cases.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are interested to get image as a slide show showing all the images then you could simply use an integer array of all the images and next simply get the images using the array index.
You can use the link click here and you can show the image as a slide show (perhaps you need to do some modifications in that)
Where imageCountArray is something like this :
and be sure that you are having images in your resources drawables folder
Edit :
or even you can use something like
and use this id instead of the array
Hope this helps.Happy Coding