3

twa に関するGoogle Developers ページをたどり、URL バーを非表示にした後、URL バーのない twa が機能するようになりました。ただし、StatusBar は引き続き表示されます。

全画面表示を取得するために、twa の StatusBar を非表示にすることは可能ですか?

AndroidManifest.xml

<application
    android:allowBackup="true"
    android:icon="@mipmap/battlechoc_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:screenOrientation="landscape"
    android:theme="@style/Battlechoc.Fullscreen.Theme"
    tools:ignore="GoogleAppIndexingWarning">

    <meta-data
        android:name="asset_statements"
        android:value="@string/asset_statements" />

    <activity
        android:name="android.support.customtabs.trusted.LauncherActivity"
        android:label="@string/app_name"
        android:screenOrientation="landscape"
        android:theme="@style/Battlechoc.Fullscreen.Theme">

        <meta-data
            android:name="android.support.customtabs.trusted.DEFAULT_URL"
            android:value="https://battlechoc.com" />

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

        <intent-filter android:autoVerify="true">
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE"/>
            <data
                android:scheme="https"
                android:host="@string/hostname"/>
        </intent-filter>
    </activity>
</application>

style.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Battlechoc.Fullscreen.Theme" parent="@style/Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>

4

1 に答える 1