Method One:
by theme.translucent
@android: Style/theme. Translucent @android: Style/theme. Translucent. @android: Style/theme. Translucent. Notitlebar. fullscreen
Only need to be in the manifest in the activity of transparent set theme for any of the above can be
<ActivityAndroid:name= "COM.VIXTEL.SIMULATE.MAINAPP"Android:configchanges= "Keyboardhidden|orientation"Android:label= "@string/app_name " android:screenorientation= "portrait" android:theme= "@ Android:style/theme.translucent.notitlebar "> < Intent-filter> <action Android:name= "Android.intent.action.MAIN"/> << Span class= "title" >category android:name= " Android.intent.category.LAUNCHER "/> </ intent-filter> </ACTIVITY>
Method Two:
Custom style, like the custom dialog style, adds a transparent color value to the Res-values-color.xml:
<?xml version= "1.0" encoding= "UTF-8"?><resources> <name="Transparent" > #0000</color></resources>
Add the following in Res-values-styles.xml:
<style name="Mytransparent" ><item name= "Android:windowbackground" > @color/ Transparent</item> <item span class= "attribute" >name= "Android:windownotitle" >true</item> <item name= "android:windowistranslucent" >true</item> span class= "tag" ><item name= "Android: Windowanimationstyle "> @android: Style/animation.translucent</item > </STYLE>
In manifest, you need transparent activity settings theme for our custom
Android:theme="@style/mytransparent"
After running the program, it's all transparent, and seeing everything in the background can be ineffective.
Android settings activity background for transparent style