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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:59:49+00:00 2026-05-27T12:59:49+00:00

I’m working on a Gingerbread (2.3.3) device. I have an ImageView which contains an

  • 0

I’m working on a Gingerbread (2.3.3) device. I have an ImageView which contains an arrow figure and have a fully transparent background which I need to draw on some background. The problem is that there’s a “shading” artifact beneath the ImageView’s bounding box.
If you look closely on the following image, you’ll see the artifact i’m talking about: 1

Both the foreground image and the background image have alpha channels and therefore are decoded as ARGB8888 (I double checked this by manually decoding their resources into a bitmap, print out the bitmap configuration which showed ARGB8888, and then assigning them to their respective views). I also configured the Activitiy’s window to be PixelFormat.RGBA_8888 before the call to setContentView().

Please don’t refer me to threads that suggest decoding the bitmap as ARGB8888 and/or set the window to be RGBA_8888, since I tried both solutions, which didn’t help.

Any ideas how can I fix this issue?

EDIT:

Here’s the function which sets the Window pixel format and drawables (called directly from onCreate()):

public void testTransparency() {
    getWindow().setFormat(PixelFormat.RGBA_8888);
    setContentView(R.layout.transparency_test);
    LinearLayout ll = (LinearLayout)findViewById(R.id.ll);      
    Bitmap bgBmp = BitmapFactory.decodeResource(getResources(), R.raw.bg);
    Log.d(TAG,"BG BMP Config: " + bgBmp.getConfig());
    ll.setBackgroundDrawable(new BitmapDrawable(bgBmp));
    ImageView iv = (ImageView)findViewById(R.id.iv);
    iv.setBackgroundDrawable(null);
    Bitmap arrowBmp = BitmapFactory.decodeResource(getResources(), R.raw.big_arrow);
    Log.d(TAG,"Arrow BMP Config: " + arrowBmp.getConfig());
    iv.setImageBitmap(arrowBmp);
}

And here’s the (very simple) layout my test is using:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
    android:id="@+id/ll"  
    android:layout_width="fill_parent"  
    android:layout_height="fill_parent"  
    android:orientation="vertical"  
    android:gravity="center">

<ImageView android:id="@+id/iv"
    android:layout_width="72dp"
    android:layout_height="120dp"
    /></LinearLayout>

The ‘bg’ resource can be found at 2
The ‘big_arrow’ resource can be found at “http://i.imgur.com/3V6QU.png&#8221;

EDIT 2:
I found out I can’t reproduce the problem on the emulator, nor on my N1 (2.3.4) or XOOM (3.2.1). There are 2 options continuing from here:
1. The problem is device specific (Android based appliance i’m working on)
2. There’s a specific problem with 2.3.4 and 32BPP framebuffer while rendering transparent PNGs on top of each other.

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-05-27T12:59:50+00:00Added an answer on May 27, 2026 at 12:59 pm

    Found the bug and indeed it was a platform specific bug.

    I found out when I remove the neon optimizations in the blended blitting portion of SKIA (in SkBlitRow_D32.cpp – SkBlitRow::Proc32 SkBlitRow::Factory32(unsigned flags)), the shading artifact disappears.

    A useful tip for anyone who want to debug this sort of bugs:
    You can always draw your view hierarchy to a bitmap (See: Android get a bitmap of a view before drawing? for example) and then use Bitmap.compress method to export the bitmap to a PNG file. This way you can obtain your view hierarchy snapshot with its alpha channel (Which doesn’t appear in A DDMS screenshot since it’s generated after composition). I found out this way that the alpha value within the shaded area is ‘1’ instead of ‘0’, creating the artifact.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.