Changing Navigation Drawer Activity Image

Asked

Viewed 427 times

0

I’m creating an app by Android Studio and chose Navigation Drawer Activity as the system screen.

inserir a descrição da imagem aqui

But I would like to know how to change the green background and place an image.

inserir a descrição da imagem aqui

I believe it’s the block below:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="@dimen/nav_header_height"
    android:background="@drawable/side_nav_bar"
    android:gravity="bottom"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:theme="@style/ThemeOverlay.AppCompat.Dark">

Along those lines:

android:background="@drawable/side_nav_bar"

I’m not sure, but if it is, how do I change it?

1 answer

0


I managed to change it. For that, I copied the image I wanted to put and pasted inside the folder drawable from Android Studio, then changed the line:

android:background="@drawable/bg16"

And it worked!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.