I would like to place icon is upper left corner of Activity title bar. Also how do I widen the activity title bar? Thanks Is it possible to have button on left side that is menu so when you click it has menu item like logoff?
Asked
Active
Viewed 1,138 times
2 Answers
1
if you are using toolbar it is done like this:
getSupportActionBar().setIcon(R.drawable.your_icon);

Chordin4tion
- 984
- 6
- 15
-
Ok, do you know how I could have a dropdown from there? – MuayThai Oct 22 '15 at 06:09
-
you can have dropdown in overflow menu using menu.xml...goto menu.xml and add list same as settings in menu.xml.... – Chordin4tion Oct 22 '15 at 06:13
1
In your Action bar what you can do is
getSupportActionBar().setIcon(R.drawable.icon);
and also you can set the logo in your manifest file
In AndroidManifest.xml add line:
android:logo="@drawable/icon"

Moubeen Farooq Khan
- 2,875
- 1
- 11
- 26
-
How about a dropdown menu on left hand side? What's involved in that? – MuayThai Oct 22 '15 at 06:10
-
-
http://stackoverflow.com/questions/8312344/how-to-add-a-dropdown-item-on-the-action-bar – Moubeen Farooq Khan Oct 22 '15 at 06:20