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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:20:30+00:00 2026-06-12T05:20:30+00:00

I have a gallery where I have a bitmaps. This is code: // Bitmap

  • 0

I have a gallery where I have a bitmaps. This is code:

    // Bitmap snoop = BitmapFactory.decodeResource(mContext.getResources(), mImageIds[position]);
   // i.setImageResource(mImageIds[position]);
   // i.setScaleType(ImageView.ScaleType.FIT_XY);
        BitmapFactory.Options options = new BitmapFactory.Options();

        // will results in a much smaller image than the original
        Bitmap b = BitmapFactory.decodeFile("/sdcard/DinEgen/"+name.get(position), options);
        Bitmap img = Bitmap.createScaledBitmap( b, width, height, true );
         b.recycle();
    i.setImageBitmap(img);
    //i.setBackgroundResource(mGalleryItemBackground);
    i.setGallery(g);
    i.setLayoutParams(new Gallery.LayoutParams(width, height));

    return i;

When I start application everything looks ok. Like on the picture:
enter image description here

and when I go to next page everything looks bad:
enter image description here

Color is lighter and on left side is something like edge with good color. When I back color is lighter too and this edge is on right side. I used in gallery

android:fadingEdge=”none”
android:fadingEdgeLength=”0px”

but still doesn’t work. Any idea why color is changing and why when I go to next page I see this edge? Any ideas why this is happens?

Edit1: I resolve one problem with margins. I add 30 to width in: i.setLayoutParams(new Gallery.LayoutParams(width+30, height)) but still colors are lighter after go to next page. Any idea why?

  • 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-12T05:20:32+00:00Added an answer on June 12, 2026 at 5:20 am

    try the following to stop image overlapping and thus eliminating your problem :

    Gallery gallery= (Gallery)findViewById(R.id.gallery);
    gallery.setHorizontalFadingEdgeEnabled(false);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code to pick the images from gallery or camera: protected void
I have photo gallery code that does image re-sizing and thumbnail creation. I use
I have a gallery that's loaded via a BaseAdapter . This works fine. I
i have created a coverflow using the code given by http://android.jmsliu.com/138/android-infinite-loop-gallery.html . And it
i have the following code that lists all the jpeg in the phone's gallery.
I'm using an Uri returned from image gallery to create a Bitmap. I have
I have am using a This LoaderImageView in a gallery. 1st I show a
I have a gallery that doesnt work properly with setTimeout. I need to make
I have custom gallery. Gallery represents items that are frame layout. There are one
I have a gallery of images on my website. Under each one, I'd like

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.