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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:19:01+00:00 2026-05-20T22:19:01+00:00

Hey guys how are you doing? i have setup a gallery view for my

  • 0

Hey guys how are you doing? i have setup a gallery view for my application and i would like to load images in this view from a specific image folder on my sdcard. Can someone please help me, as i searched alot and none of the provided solutions worked.

I have successfuly managed to load images from the RES/DRAWABLE folder into my gallery view, but never succeeded in my original plan.

This is the imageadapter class i use where i load the images from the RES/DRAWABLE folder

public class ImageAdapter extends BaseAdapter 
{

        public ImageAdapter(Context c) 
        {
            mContext = c;
        }

        public int getCount() 
        {
            return mThumbIds.length;
        }

        public Object getItem(int position) 
        {
            return position;
        }

        public long getItemId(int position) 
        {
            return position;
        }

        public View getView(int position, View convertView, ViewGroup parent) 
        {
            ImageView imageView;
            if (convertView == null)
            {
                imageView = new ImageView(mContext);
                imageView.setLayoutParams(new Gallery.LayoutParams(100, 100));
                imageView.setAdjustViewBounds(false);
                imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
                imageView.setPadding(18, 18, 18, 18);
            } 
            else 
            {
                imageView = (ImageView) convertView;
            }

            imageView.setImageResource(mThumbIds[position]);

            return imageView;
        }

        private Context mContext;

        private Integer[] mThumbIds = 
        {
               R.drawable.image_1,
               R.drawable.image_2,
               R.drawable.image_3,
               R.drawable.image_4
        };
}
  • 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-20T22:19:01+00:00Added an answer on May 20, 2026 at 10:19 pm

    Here is a tutorial I used to do exactly what you want. If it doesn’t help I can post the code I used to grab pictures that are stored directly on the device (not the sd card).

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

Sidebar

Related Questions

Hey guys, how the heck do I go about doing this. I have an
Hey Guys, here is my code for this, the only help i get from
Hey guys really quick question, I have a simple test that I was doing
hey guys, i have read This post, so what i got is JSON is
Hey guys so, im doing this form with a input that will contain the
Hey guys, here's my requirement: I have one central App which receives requests from
hey guys, what am i doing wrong. i have kind of folders on my
Hey guys, It's 5 am here, I was doing some code... when this came
Hey guys, I'm doing an ASP.NET MVC project just for learning...and stuck in this...
hey guys, i know it's not the best way of doing this but the

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.