Android Code Snippet Full Screen Theme

Discussion in 'Code Snippets' started by Erel, Jun 7, 2018.

  1. Erel

    Erel Administrator Staff Member Licensed User

    Setting these two attributes will cause your app to run in full screen:
    Code:
    #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:
    Code:
    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:
    Code:
    CreateResourceFromFile(Macro, Themes.DarkTheme) 'remove this line
     
  2. LucaMs

    LucaMs Expert Licensed User

    Geezer and Erel like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice