开发者

How to create Transparent background?

开发者 https://www.devze.com 2023-01-31 02:43 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消