Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android:Default Action bar is populating while loading App

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>
like image 890
Maulik Avatar asked Oct 07 '13 09:10

Maulik


1 Answers

Try using this in your theme present in styles.xml

<item name="android:windowDisablePreview">true</item>

like image 83
maaz Avatar answered Sep 29 '22 11:09

maaz