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
精彩评论