skip to Main Content

So, I did this in photoshop:

Is a navigationview:

enter image description here

But for some reason in android I get this:
enter image description here

My questions:

1: How can I change the title color of the menu?

This is my menu.xml:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

    <group android:checkableBehavior="single" android:id="@+id/grp1">
        <item android:title="LOREM IPSUM" android:id="@+id/menu_1">
            <menu>
                <item
                    android:id="@+id/nav_camera"
                    android:icon="@drawable/sharkred"
                    android:title="LOREM IPSUM" />
                <item
                    android:id="@+id/nav_gallery"
                    android:icon="@drawable/sharkblue"
                    android:title="LOREM IPSUM" />
                <item
                    android:id="@+id/nav_slideshow"
                    android:icon="@drawable/sharkpink"
                    android:title="LOREM IPSUM" />
            </menu>
        </item>

    </group>

    <item android:title="LOREM IPSUM" android:id="@+id/action_divider"
        >
        <menu>
            <item
                android:id="@+id/nav_share"
                android:icon="@drawable/sharkyellow"
                android:title="LOREM IPSUM" />
            <item
                android:id="@+id/nav_send"
                android:icon="@drawable/sharkgreen"
                android:title="LOREM IPSUM" />
        </menu>
    </item>

    <item android:title="LOREM IPSUM"
        >
        <menu>
            <item
                android:id="@+id/nav_share2"
                android:icon="@drawable/sharkgrey"
                android:title="LOREM IPSUM" />
        </menu>
    </item>

</menu>

2: How can I add a line separator below of the items and not the title? Is not a full line.
3: I added my icons to the menu.xml but the images are black.

2

Answers


  1. Chosen as BEST ANSWER

    Found the solution for the #3:

        navigationView.setItemIconTintList(null);
    

  2. You can create custom Navigation drawer

    Some of the useful links

    Add your own layout for items for drawer

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search