Android Question Transparent Background

Hello Everyone
How can I make an activity background transparent but not effect on views?
Because when I change the theme of my activity in manifest, It will affect on activity and all of views
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This will create a transparent activity:
B4X:
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, theme.xml,
<resources>
    <style name="LightTheme" parent="@android:style/Theme.Material.Light.NoActionBar">
       <item name="android:actionMenuTextAppearance">@style/LowerCaseMenu</item>
       <item name="android:background">@android:color/transparent</item>
       <item name="android:windowBackground">@android:color/transparent</item>
       <item name="android:windowIsTranslucent">true</item>
    </style>
     <style name="LowerCaseMenu" parent="android:TextAppearance.Material.Widget.ActionBar.Menu">
        <item name="android:textAllCaps">false</item>
    </style>

</resources>
)

Make sure to set the activity color to transparent.
 
Upvote 0
Top