Show transparent activity in Android?

How can I set (by code) a Activity transparency? I want the activity to become transparent when the user clicks a button. Is it possible?

+4
source share
1 answer

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

But remember about yourself:

Define a base theme for this context. Please note that this must be called before any views are created in the Context (for example, before calling setContentView (View) or bloating (int, ViewGroup)).

A source

+4
source

Source: https://habr.com/ru/post/1369647/


All Articles