Android 移除导航抽屉活动(主)和其他所有活动上的应用程序标签
我正在我的应用程序中使用导航抽屉活动,我在标题栏上添加了漂亮的徽标。 我想删除标题上的应用程序名称。我尝试了很多代码。我不想用Android 移除导航抽屉活动(主)和其他所有活动上的应用程序标签,android,navigation-drawer,titlebar,Android,Navigation Drawer,Titlebar,我正在我的应用程序中使用导航抽屉活动,我在标题栏上添加了漂亮的徽标。 我想删除标题上的应用程序名称。我尝试了很多代码。我不想用 Theme.AppCompat.NoActionBar in style.xml <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar"> <item name="windowActionBar">false</item>
Theme.AppCompat.NoActionBar
in style.xml
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:splitMotionEvents">false</item>
</style>
假的
真的
假的
假的
在安德洛德梅因费斯特
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
试试看 在style.xml中
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:splitMotionEvents">false</item>
</style>
假的
真的
假的
假的
在安德洛德梅因费斯特
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
试试看 试试下面这句话,可能有用
getActionBar().setDisplayShowTitleEnabled(false);
或
试试下面这句话,可能有用
getActionBar().setDisplayShowTitleEnabled(false);
或
在AndroidManifest.xml中
<activity
android:name=".MainActivity"
android:label=""
android:theme="@style/AppTheme.NoActionBar"
android:configChanges="screenSize|orientation">
</activity>
在styles.xml中添加以下代码
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
假的
真的
在AndroidManifest.xml中
<activity
android:name=".MainActivity"
android:label=""
android:theme="@style/AppTheme.NoActionBar"
android:configChanges="screenSize|orientation">
</activity>
在styles.xml中添加以下代码
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
假的
真的
你用过工具栏吗?你是说它是自定义工具栏吗?没有类似于getActionBar().setTitle(“”)的东西吗?
我尝试过,但我的应用程序强制关闭了Yes@SobhanMoradi,你能分享布局文件的代码吗?你用过工具栏吗?你是说它是自定义工具栏吗?没有类似于getActionBar().setTitle(“”)的东西吗
?我尝试过,但我的应用程序强制关闭了Yes@SobhanMoradi,你能分享一下布局文件的代码吗?非常感谢。getSupportActionBar().setDisplayShowTitleEnabled(false);谢谢你这么高兴。getSupportActionBar().setDisplayShowTitleEnabled(false);工作