简单的导航抽屉

时间:2018-06-22 21:52:47

标签: android

https://developer.android.com/training/implementing-navigation/nav-drawer#java

当我创建菜单资源并输入代码时,出现错误,提示无法解析符号。这是我的代码

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <group android:checkableBehavior="single">
    <item
        android:id="@+id/nav_camera"
        android:icon="@drawable/ic_menu_camera"
        android:title="@string/import" />
    <item
        android:id="@+id/nav_gallery"
        android:icon="@drawable/ic_menu_gallery"
        android:title="@string/gallery" />
    <item
        android:id="@+id/nav_slideshow"
        android:icon="@drawable/ic_menu_slideshow"
        android:title="@string/slideshow" />
    <item
        android:id="@+id/nav_manage"
        android:icon="@drawable/ic_menu_manage"
        android:title="@string/tools" />
</group>
</menu>

0 个答案:

没有答案