Android-When my android app is launching populates default action bar for seconds and then replaces that action bar with my customize action bar. How to get rid of that default action bar when my app is launching
Used Following Code To hide default Action Bar.Which eventually replaces my actual action bar
MainActvity.java
final ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayUseLogoEnabled(false);
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setCustomView(R.layout.actionbar_custom_view_home);
Android Menifest Code:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.demowithoutactionbar.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Try using this in your theme present in styles.xml <item name="android:windowDisablePreview">true</item>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With