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 974951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:30:33+00:00 2026-05-16T03:30:33+00:00

How would I edit this tutorial so that it will grab images from the

  • 0

How would I edit this tutorial so that it will grab images from the SD card?

http://developer.android.com/guide/tutorials/views/hello-gallery.html

          private Integer[] mImageIds = {
        R.drawable.lol.marker,
        R.drawable.sample_2,
        R.drawable.sample_3,
        R.drawable.sample_4,
        R.drawable.sample_5,
        R.drawable.sample_6,
        R.drawable.sample_7
        };

Alternatively is it possible to make subfolders within R.drawable?

  • 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-05-16T03:30:34+00:00Added an answer on May 16, 2026 at 3:30 am

    R.drawable is not a directory but a class containing static fields which are references to your resources.You can’t create subfolders in the directory “drawable”.
    Now If you want to replace this array of ids by images on the SD card, you have to use a content resolver to get them. Would be something like that I suppose :

    Cursor c = this.getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null,null);
    startManagingCursor(c);  
    

    and then when you have retrieved the id of the images you want, you can put them in the array and use something like that to display them :

    yourImageView.setImageURI(Uri.withAppendedPath(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI, id+"")); 
    

    EDIT
    You can try something like that. Though i’m not sure:

     Bitmap bitmap = BitmapFactory.decodeFile("path/to/the/image.png");
      yourImageView.setImageBitmap(bitmap);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this line: $(#clients-edit-wrapper).height($(window).height()-150); I would like to apply that height function to
**EDIT: There are several options below that would work. Please vote/comment according to your
Edit: Appended or LDAP to question title to indicate that I would be fine
I would like to write a script which will edit multiple XML files, I
I'm using this tutorial on AsyncTask with a task and a notification: https://eliasbland.wordpress.com/2011/03/11/an-example-of-how-to-run-a-background-task-and-report-progress-in-the-status-bar-using-asynctask-on-android/ What
I would like to edit matlab scripts in two cases (1) In matlab Command
I'm working in Visual Studio 2008 and I would like for Edit > Outlining
I would like to place an edit control (WC_EDIT) on a static control (WC_STATIC).
How would I change the below script to edit the original file instead of
I would like to know how I could edit mp3 files on the server

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.