I made an icon for my Android app but I want to use a different file for the action bar. So on icon for app section, and one icon for action bar. How can I do that ?
From official documentation:
By default, the system uses your application icon in the action bar,
as specified by the icon attribute in the or
element. However, if you also specify the logo attribute, then the
action bar uses the logo image instead of the icon.
http://developer.android.com/guide/topics/ui/actionbar.html#Logo
Related
I want to add an icon to a menu in the navigation drawer, and I created the icon using image assets by the type of launcher icons(adaptive and legacy) then when I assign its name to the menu item it shows just blank but when I write the icons foreground layer names it works, why? because when I choose the icon type action bar and tab icons then it works with the icon's name. I hope you could understand the question.
I've tried changing the android:icon property in Android Manifest but it changes also the image in the action bar. I want one image for the action bar, one for the launcher icon? Any suggestions?
Thank you
I want to customize navigation drawer app compact action bar, I want to remove app icon from that and want to make its title center in action bar.
I have applied all solutions , but nothing is working with all the conditions.
Please give me some clue for applying it correctly
You should creat a customize action bar. Then, if you want you can add a button that can open and close your drawerlayout.
I have solved my problem. As mentioned, I have two problems, and I solved that in following way :
1) For making title centre, we need to make custom layout of action bar, and need to remove action bar title.
2) for remove app icon from action bar, we need to set android:icon property of that activity in manifest with transparent image or colour.
I know I can use android:logo in the manifest file to make my brand logo prominent in the action bar of my Android app. But the logo ends up being only as big as the action bar icon.
Are there any dimension guidelines so that I can have a wide action bar logo?
By default the native ActionBar show app name with app icon on the left. I want to replace all this section
with a custom logo
searching seems that I have to edit the styles.xml file to customize the action bar, but I haven't understood what is the right way and what resolution should have the logo.
"By default, the system uses your application icon in the action bar, as specified by the icon attribute in the <application> or <activity> element. However, if you also specify the logo attribute, then the action bar uses the logo image instead of the icon."
source: http://developer.android.com/guide/topics/ui/actionbar.html
In order to remove the Title of the Activity you call ActionBar.setDisplayShowTitleEnabled(false);