Drawable is not taking pictures

2

Well, I'm making an app that has a drawer, and the menu that appears sideways is a navigationView. So far so good, but in the .xml code I want to add icons, you're not picking up the images.

Drawer's .xml code looks like this:

<group android:checkableBehavior="single">
    <item
        android:id="@+id/nav_home"
        android:icon="@drawable/ic_menu_camera"
        android:title="Home" /> 

But within the drawable folder the ic_menu_camera object is not an image but another .xml code. So:

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24.0"
    android:viewportHeight="24.0">
<path
    android:fillColor="#FF000000"
    android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"/>
<path
    android:fillColor="#FF000000"
    android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z"/>

I would like to change this icon but when I add a .png image in the drawable folder and call it like this (code below), the image does not appear:

<group android:checkableBehavior="single">
    <item
        android:id="@+id/nav_home"
        android:icon="@drawable/home_icon"
        android:title="Home" />
    
asked by anonymous 13.11.2015 / 13:18

0 answers