我只想将我的设计视为底部导航视图,因此我通过设置tools:showIn="bottom_navigation_view"在menu.xml文件上尝试了以下操作,但它对我的设计视图选项卡没有任何影响
我不想要的菜单视图的图像
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:showIn="bottom_navigation_view">
<item
android:id="@+id/navigation_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="@string/title_home" />
<item
android:id="@+id/navigation_dashboard"
android:icon="@drawable/ic_dashboard_black_24dp"
android:title="@string/title_dashboard" />
<item
android:id="@+id/navigation_notifications"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/title_notifications" />
</menu>
所以请给我建议这样一个价值的工具:showIn可以工作。