Reputation: 52
I'm trying use Navigation Drawer. Everything is okay, but there is an error here:
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity"
>
<item
android:id="@+id/action_example"
android:orderInCategory="100"
android:title="@string/action_example"
android:showAsAction="ifRoom"
/>
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
android:showAsAction="ifRoom"
/>
</menu>
Red underlined (two)line is:
android:showAsAction="ifRoom"
Information message is here
And This line is grayed.
xmlns:app="http://schemas.android.com/apk/res-auto"
Any help can be help!
Upvotes: 0
Views: 63
Reputation: 3417
change this line
android:showAsAction="ifRoom"
to
app:showAsAction="ifRoom"
And Clean Build your Project.You are done.Hope it will help.Thanks
Upvotes: 2