0

After research in goole, I can hide action bar but the current result is the action bar still show few seconds before open MainActivity. You can refer in the gif below.

My question is can we hide action bar immediately when launch app?

Here's my source code

enter image description here

Trai Nguyen
  • 809
  • 1
  • 8
  • 22

1 Answers1

1

I change theme like below

    <style name="Theme.Transparent" parent="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>
        <item name="android:windowIsTranslucent">true</item>
    </style>

In AndroidManifest.xml

<activity
     android:name=".MainActivity"
     android:exported="true"
     android:label="@string/app_name"
     android:theme="@style/Theme.Transparent">
     <intent-filter>
         <action android:name="android.intent.action.MAIN" />
         <category android:name="android.intent.category.LAUNCHER" />
     </intent-filter>
</activity>

And the result:

enter image description here

I also commit new source code to HERE if anyone needed

Trai Nguyen
  • 809
  • 1
  • 8
  • 22