Android Code Snippet Full Screen Theme

Similar threads

B4A Code Snippet Change the action bar height
B4A Code Snippet Version safe themes
Other B4A v8.0 has been released!
B4A Code Snippet Theme Colors
Other New feature - Manifest macros

Erel

Administrator
Staff member
Licensed User
Setting these two attributes will cause your app to run in full screen:
B4X:
#FullScreen: true
#IncludeTitle: false
However the action bar will appear for a short moment when your app starts.

You can use this theme to prevent it from appearing:
B4X:
SetApplicationAttribute(android:theme, "@style/DarkTheme")
CreateResource(values-v20, theme.xml,
<resources>
    <style
        name="DarkTheme" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
    </style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
    <style
        name="DarkTheme" parent="@android:style/Theme.Holo.NoActionBar.Fullscreen">
    </style>
</resources>
)
Make sure to remove the default theme:
B4X:
CreateResourceFromFile(Macro, Themes.DarkTheme) 'remove this line
 
Top