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
Related
I tried to add an icon to the Action Bar, in ShowAsAction I set it to ifRoom. But no matter how, the icon only shows up in the 3 dot menu and never show up in the Action Bar, what are the possible cause of this issue?
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 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
Is it possible in Android to declare a HomescreenIcon for the user e.g. colored and inside the application the same Icon shown in the Action Bar just white?
In my case these are two different images i want to show. I defined the icon inside the AndroidManifest.xml but i can not find any option to change it for the ActionBar. It is always the same.
Yes, you can use android:logo in your manifest to provide the action bar image and android:icon to provide home screen icon. Both of them should be set to a drawable resource and can point to a different resources.
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);