开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜