Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

How to change icons of drawer?

Hey i am currently working on a android studio project and i am trying to change the icons of the navigation drawer activity please help. Here is my code:

this is the ic_menu_send file <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportHeight="24.0" android:viewportWidth="24.0"> <path android:fillColor="#FF000000" android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/> </vector><?xml version="1.0" encoding="utf-8"?>

this is the drawer xml: <menu xmlns:android="http://schemas.android.com/apk/res/android">

<group android:checkableBehavior="single">
    <item
        android:id="@+id/websites"
        android:icon="@drawable/ic_menu_camera"
        android:title="Websites"/>
    <item
        android:id="@+id/apps"
        android:icon="@drawable/ic_menu_gallery"
        android:title="Apps"/>

</group>

<item android:title="Contact">
    <menu>
        <item
            android:id="@+id/email"
            android:icon="@drawable/ic_menu_share"
            android:title="Email"/>
        <item
            android:id="@+id/nav_send"
            android:icon="@drawable/ic_menu_send"
            android:title="Send"/>
    </menu>
</item>

</menu>

POST YOUR CODE!!!!!!!

Programers can't help if there is no code.

1 Answer

You need the right picture address.