开发者

Mixing Android style: Transparent and Fullscreen

Anybody made this successfully? I'm trying connect two styles to get fullscreen开发者_开发百科 activity with transparent background... Unfortunately it's not so easy as should be. Any idea?


If by "transparent" you mean an activity that has no background (i.e. see through to the home screen), set the activity's theme to "translucent" in the androidmanifest file:

android:theme="@android:style/Theme.Translucent"

You can also set the theme in the activity's OnCreate method right before inflating the layout: setTheme(android.R.style.Theme_Translucent_NoTitleBar);

To make the activity less transparent, set its layout's background to a repeating 1x1 PNG image with alpha channel transparency. color to a hex value with alpha channel value between 00 and FF.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜