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

  • SEARCH
  • Home
  • 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 8726471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:15:12+00:00 2026-06-13T08:15:12+00:00

I have a list of images in my drawable folder . I have code

  • 0

I have a list of images in my drawable folder .
I have code to show them in coverflow.
So to refer images, I can use the following way using R.drawable._ etc, see below-

public class ImageAdapter extends BaseAdapter{

    private Context context;
    private ImageView[] images;
    private Integer[] imageids={
            R.drawable. image001,
            R.drawable. image002,
            R.drawable. image003,
            R.drawable. image004,
            R.drawable. image005,
            R.drawable. image006,

            R.drawable. image007,
            R.drawable. image008,
            R.drawable. image009,

            R.drawable. image011,

            R.drawable. image012,
            R.drawable. image013,
            R.drawable. image014,
            R.drawable. image015,
            R.drawable. image016,

            R.drawable. image017,
            R.drawable. image018,
            R.drawable. image019,
            R.drawable. image020,
            R.drawable. image021,
            R.drawable. image022,
            R.drawable. image023,
            R.drawable. image024,

        };
    public ImageAdapter(Context con)
    {
        this.context=con;
        images=new ImageView[imageids.length];
    }
}

Now my question is how to refer the images of my SDCARD in above imageid list.
I have found a related question on stackoverflow but no answer.
Please anyone answer this question if know.
Can I create the list of videoid’s also in the same way????

Thanks.

  • 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-13T08:15:13+00:00Added an answer on June 13, 2026 at 8:15 am
    /mnt/sdcard/pathtoyourfile
    

    can be used refer to the file in the sdcard. For example, if you have a image file as image.jpg in a folder named myfolder in sdcard you can have,

    Bitmap b = BitmapFactory.decodeFile("/mnt/sdcard/myfolder/image.jpg");
    imageView.setImageBitmap(b);
    

    This path can be used for video as well. As I can see your array is type Integer.Instead you can use a String array.

    BitmapFactory.decodeFile(“”); is used to decode a file into a Bitmap. Here you can find a documentation.

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

Sidebar

Related Questions

In my android project I have several images int the drawable folder with a
In my app, I have a bunch of images in my drawable folder which
I have a list of images like this public Integer[] mImageIdsen = { R.drawable.small,
i have list of images and on mouse over there is option box shows
I have list of images with some simple mouseenter / mouseleave effect. http://jsfiddle.net/4vTCr/ I
I have a list of images with overlays. When I mouseover the images, the
I have a list of images in a table like so: <div id=scroll-uploader-photos> <table>
I have a list of images (thumbnails), displayed as a gallery. These images have
I have a list of images that need to be displayed. However theres only
I have a list of images which I want to display in a page.

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.