Reputation: 1868
I have downloaded a Android Navigation drawer sample project and trying to use that. At the initial state, i don't know how to change the navigation drawer title icon to different icon image. where exactly is this image located specifically? Is it under any specific Res->drawable folder? Please find the screenshot, where I rounded the navigation title icon image, which I want to change now.
Upvotes: 1
Views: 1032
Reputation: 1354
Another option:
getSupportActionBar().setLogo(R.drawable.yourImage);
or
getActionBar().setLogo(R.drawable.yourImage);
Note: Attribute "logo" is only used in API level 11 and higher android:logo requires api (if you don't use getSupportActionBar)
Upvotes: 0
Reputation: 126
where exactly is this image located specifically? Is it under any specific Res->drawable folder?
To find where the image is located in eclipse, do the following: res -> drawable
Also the image might be locate in either drawable-hdpi, drawable-ldpi, drawable-xhdpi, drawable-xxhdpi
Once you find the image location, replace the image with an image of your choice. Either give the image a new name or keep it the same name as the old image. If you decide to give the image a new name you will have to head on over to the AndroidManifest.xml and replace the old name given to the old image with the new name that you gave the new image.
android:logo="@drawable/your_image_file_name"
Upvotes: 0
Reputation: 8680
You can change it in your AndroidManifest.xml, put your icon in your res/drawable folder and set the "logo" param to your icon like this:
<manifest>
...
<application
...
android:logo="@drawable/your_image_file_name">
</application>
...
</manifest>
Upvotes: 1
Reputation: 4954
You should change your app icon in AndroidManifest.xml
android:icon="@drawable/ic_launcher"
Upvotes: 0
Reputation: 1262
You can find it being set in your manifest. It automatically accesses @drawable/ic_launcher as your app icon
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Byustudiestab" >
Upvotes: 0