Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8893049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:09:10+00:00 2026-06-14T23:09:10+00:00

I have some 50 images which i want to display on view dynamically by

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:09:11+00:00Added an answer on June 14, 2026 at 11:09 pm

    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)

    private void setImagesToFlipper(ViewFlipper flipper) {
    
      for (int count = 0; count < imageCountArray - 1; count++) {
       ImageView imageView = new ImageView(this);
       Bitmap  bmp = BitmapFactory.decodeResource(getResources(), imageCountArray[count]);
       imageView.setImageBitmap(bmp);
       flipper.addView(imageView);
    
      }
    

    Where imageCountArray is something like this :

     int imageCountArray[] = {R.drawable.image0,R.drawable.image1,R.drawable.image2,R.drawable.image3,R.drawable.image4,};
    

    and be sure that you are having images in your resources drawables folder

    Edit :

    or even you can use something like

    String mDrawableName = "image1";
    int resID = getResources().getIdentifier(mDrawableName , "drawable", getPackageName());
    

    and use this id instead of the array

    Hope this helps.Happy Coding

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app which contain some images in res/drawable/ and shows them in
I have some images and pdf file on my server which I use in
I have a folder C:\Images which has a some images. This folder is not
I have many images to display and do paint on them. I want to
I have a List which has information about images I want to display. Each
I have one AlertDialog which is working fine.I have set some background images to
i have the following code which switches some fullscreen-background-images (fadeOut, fadeIn). setInterval(function() { var
I'm working on some code which fills a GridView full of images that have
I have a script which collects an image, link and some text content from
I have a thread which performs some tasks. At the end I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.