I have following code for main layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/layout"
android:gravity="center"
android:background="#00000000"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="200dp"
android:layout_height="200dp"
android:background="#FFFFFF" />
</LinearLayout>
I need that the LinearLayout will be transparent. I thought that I can do it using the alpha setting in a background attibute, but it doesn’t work. Please, tell me – I need that my application will be empty and has a white rectangle on the center of a screen.
You want the activity to be transparent?
Try using this theme in your activity tag (in the manifest file):
@android:style/Theme.TranslucentFor other possible ways, ie child theme see the following answers:
Activity should be transparent, but has black background
How do I create a transparent Activity on Android?
how to make activities transparent