androidgomobileopengl-esgomobile

How to hide Android status bar in native game written with gomobile


How to hide Android status bar in native game written with gomobile?

I am experimenting with a simple native Android game written in pure Go using the gomobile tool. It should be able to use the full screen for rendering frames. However I could not find an API to hide the status bar from the native app.

Has anyone tackled this issue? If so, please share the directions.


Solution

  • This is how to disable the Android status bar in a native application written with gomobile:

    Add this exact theme to AndroidManifest.xml:

    <activity android:name="org.golang.app.GoNativeActivity"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
    </activity>