Android:加载应用程序时填充默认操作栏

标签 android android-actionbar

Android - 当我的 android 应用程序启动时填充默认操作栏几秒钟,然后用我的自定义操作栏替换该操作栏。如何在我的应用程序启动时摆脱默认操作栏

使用以下代码隐藏默认操作栏。最终取代了我的实际操作栏

MainActvity.java

    final ActionBar actionBar = getActionBar();
    actionBar.setDisplayShowTitleEnabled(false);
    actionBar.setDisplayUseLogoEnabled(false);
    actionBar.setDisplayShowHomeEnabled(false);
            actionBar.setCustomView(R.layout.actionbar_custom_view_home);

Android list 代码:

  <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>

最佳答案

尝试在 styles.xml 中的主题中使用它

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

关于Android:加载应用程序时填充默认操作栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19220927/

相关文章:

android - 在 Activity 被杀死之前,onDestroy() 可以花费多少时间?

android - 如何让 SwipeRefreshLayout 在 ActionBar 中设置文本

android - 我的 2 个按钮在左下角,不知道为什么?

android - 由于 SocialAuth 库项目而崩溃

Linux 上的 Android SDK 工具 r12 更新

android - Scale 后 LinearLayout 如何在左下角对齐?

android - ActionBar 中 MenuItem 的默认全息蓝色背景是什么?

android - 如何在调用 FragmentManager.replace() 时不调用 onCreateOptionsMenu

android - 如何在注销图标之前的右侧边缘(即)显示 ImageView ?

android标题不会显示在工具栏中