How to create Transparent background?
I have LinearLayout and one of it attribute is android:background="@drawable/bgImg" I want to create the background to be transparent. Do someone have any clue about 开发者_JAVA百科this issue? Thanks
If you just want to make the layout transparent just use android:background="#00000000"
But if you want to make the application transparent (the area which is not occupied by app will be transparent) add style in manifest.xml, like following
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
Just remove that android:background="@drawable/bgImg"
attr from the LinearLayout
declaration.
精彩评论