Fully transparent Activity, transparent Activity
Step 1: Add the following code in/res/values/styles:
<Style name = "translucent"> <item name = "android: windowBackground"> @ android: color/transparent </item> <item name = "android: windowNoTitle "> true </item> <item name =" android: windowIsFloating "> true </item> <item name =" android: using wistranslucent "> true </item> <item name =" android: windowContentOverlay "> @ null </item> <item name =" android: backgroundDimEnabled "> false </item> </style>
The above uses @ android: color/transparent, which only needs to be in/res/values/strings. configure <color name = "transparent"> # FFFFFF </color> in xml, where # FFFFFF may be any color code.
Step 2: Apply the above style to TransparentActivity Registration Information in Manifest. xml
<Activity android: name = ". TrasparentActivity" android: theme = "@ style/translucent".../>
In this way, TransparentActivity is a fully transparent Activity.