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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:41:22+00:00 2026-06-17T02:41:22+00:00

I am building an UI with some transparency. I have managed to get different

  • 0

I am building an UI with some transparency. I have managed to get different buttons and layouts to be transparent, so I was a bit surprised when a View that I wanted to be somewhat transparent started to behave weirdly.

The View in question shows up as partly transparent in Eclipse, when viewing the layout in “designer”. But when I deploy it to a device (Samsung S2, Android 4), then that particular View is solid black instead.

Its a bit messy to explain how its built, but I’ll try.

First, how I want it to look (transparency, how it looks in Eclipse):

The box around the green circle is transparent

This is how it looks when deployed to the device (no transparency):

enter image description here

The first question:

Why does Eclipse/designer differ from the deployed version? I have cleaned the project several times, I have restarted Eclipse etc.

The next step is to take a look at how the structure is.

The simplified version:

[activity_main] –> [LinearLayout] –> [includes “logobar”]

The “logobar” looks like this:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="50dp"
    android:background="#80000000" >

    <RadioGroup
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:orientation="horizontal" >

        <!-- Here is the box, and then the green circle inside the box -->
        <FrameLayout
            android:layout_width="50dp"
            android:layout_height="30dp"
            android:layout_marginLeft="10dp"
            android:background="@drawable/status_background"
            android:padding="0dp" >

            <ImageView
                android:id="@+id/imageView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/bullet_ball_glass_green" />
        </FrameLayout>
        <!-- end of box -->

        <ImageView
            android:id="@+id/logo"
            android:layout_width="220dip"
            android:layout_height="55dip"
            android:background="@android:color/transparent"
            android:paddingLeft="10dp"
            android:src="@drawable/logo_demo" >
        </ImageView>
    </RadioGroup>

</RelativeLayout>

And here is the drawable “status_background” (layered for some bevel effect):

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
    <item>
        <shape android:shape="rectangle" >
            <stroke
                android:width="1px"
                android:color="#77000000" />

            <corners android:radius="5dp" >
            </corners>
        </shape>
    </item>
    <item
        android:left="1dip"
        android:top="1dp">
        <shape android:shape="rectangle" >
            <stroke
                android:width="1px"
                android:color="#77ffffff" />

            <corners android:radius="5dp" >
            </corners>
        </shape>
    </item>
    <item
        android:left="1dip"
        android:top="1dp">
        <shape android:shape="rectangle" >
            <solid android:color="#11FFFFFF"/>
            <corners android:radius="5dp" >
            </corners>
        </shape>
    </item>
</layer-list>

Second question then:
Can anyone tell me what Im doing wrong here? =) 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-17T02:41:24+00:00Added an answer on June 17, 2026 at 2:41 am

    As usual, after trying for hours, I go to the beloved Stack Overflow, and, as often before, I manage to solve the issue (well, one part of it), shortly after posting here.

    So, I cannot explain why Eclipse shows transparency, but the device didn’t. Weird behaviour.

    However, if I change the status_background as below, then it works in both:

    <?xml version="1.0" encoding="utf-8"?>
    <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
        <item>
            <shape android:shape="rectangle" >
                <solid android:color="@android:color/transparent"/>
                <stroke android:width="1px" android:color="#77000000" />
                <corners android:radius="5dp"></corners>
            </shape>
        </item>
        <item android:left="1dip" android:top="1dp">
            <shape android:shape="rectangle" >
                <solid android:color="@android:color/transparent"/>
                <stroke android:width="1px" android:color="#77ffffff" />
                <corners android:radius="5dp" ></corners>
            </shape>
        </item>
        <item>
            <shape android:shape="rectangle" >
                <solid android:color="#11FFFFFF"/>
                <corners android:radius="5dp" ></corners>
            </shape>
        </item>
    </layer-list>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a website with a TON of png-24 files that have transparent
I am fairly new to Flotr2 and I have just been building some simple
I'm building an iphone View controller that display two stacked images (on on top
i am building some basic sql query and have come unstuck on a 'group
I'm building some Linq Expression and trying to get hold of MethodInfo for IEnumerable.DefaultIfEmpty
I'm building an app in ASP.NET that will store some pictures of objects. The
I am intersted in building some text based GUIs, things that look like the
I'm building some sort of censoring app. I've gotten so far that i can
I'm building some classes for working with playing cards. I have a Card class
I'm building some crude CMS-like functionality (to get acquinted with Play Framework). For this

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.