开发者

Display a transparent Activity in Android?

How can I set (by code) an Activity to be transparent? I want the activity to become transparent when the user clicks a开发者_如何学编程 button. Is it possible?


You can use setTheme (android.R.style.Theme_Translucent)

But keep the api docs in mind:

Set the base theme for this context. Note that this should be called before any views are instantiated in the Context (for example before calling setContentView(View) or inflate(int, ViewGroup)).

Source

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜