AndroidManifest.xml
代码在这里:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.abc.xyz">
<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:screenOrientation="portrait"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".AddActivity"
android:label="@string/title_activity_add"
android:theme="@style/AppTheme" />
</application>
</manifest>
如何删除不显示 Activity 名称的下方操作栏?
最佳答案
我发现我删除了这一行。
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
所以,一旦我添加了它,它就开始正常工作了。
关于android - 显示两个操作栏的操作栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36967793/