[英]actionbar disappears when extending listActivity
I'm using API 23
and as I extended ListActivity
,then my ActionBar
items including menu items and title disappeared.我正在使用
API 23
,当我扩展ListActivity
,我的ActionBar
项目包括菜单项和标题消失了。 I couldn't find any solution for this.我找不到任何解决方案。 I'll appreciate if anyone could help me with this issue.
如果有人能帮助我解决这个问题,我将不胜感激。
here's manifest file这是清单文件
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
I think the problem with theme, what you have choose in your application.我认为主题的问题,您在应用程序中选择了什么。
Manifest显现
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Here i'm using NoActionBar
theme, so please check your application theme in manifest file
--> <application>
--> android:theme="@style/?"
这里我使用的是
NoActionBar
主题,所以请检查manifest file
应用程序主题 --> <application>
--> android:theme="@style/?"
Suggestions: Holo.Light.DarkActionBar
theme.建议:
Holo.Light.DarkActionBar
主题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.