Android icon vs logo - android

The <application> tag for the Android Manifest contains a logo attribute which I have never seen before. What is the difference between your application's icon and its logo? Is it used purely for market?

The ActionBar will use the android:logo attribute of your manifest, if
one is provided. That lets you use separate drawable resources for the
icon (Launcher) and the logo (ActionBar, among other things).
Source: Android: How to change the ActionBar "Home" Icon to be something other than the app icon?
setDisplayUseLogoEnabled()
Enables the use of an alternative image (a "logo") in the Action
Bar, instead of the default application icon. A logo is often a wider,
more detailed image that represents the application. When this is
enabled, the system uses the logo image defined for the application
(or the individual activity) in the manifest file, with the
android:logo attribute. The logo will be resized as necessary to fit
the height of the Action Bar. (Best practice is to design the logo at
the same size as your application icon.)
Source: http://developer.android.com/guide/topics/ui/actionbar.html#Style
To replace the icon with a logo, specify your application logo in the
manifest file with the android:logo attribute, then call
setDisplayUseLogoEnabled(true) in your activity.
Source: http://developer.android.com/sdk/android-3.0.html#api

It appears that:
android:logo is available in API Level 10, but not API Level 8
using android:logo without android:icon does not set the application icon in the app drawer
My hunch is that "logo" refers to a company logo instead of an application icon.

Related

How save image and set as application icon? android

I take image from gallery of camera. How i can set the image as Application icon?
I wanted write image to res/drawable as name "ic_launcher", but it is not possible.
How i can set the image as Application icon?
You cannot do any of the following at runtime:
Modify the icon used for your entry in the home screen launcher
Modify the icon used for your app in the Settings screen (e.g., list of installed apps)
Modify the icon used by default for the icon in an activity's action bar
You can, however, do the following at runtime:
Call setIcon() on the ActionBar to change the icon used in an activity's action bar
Show a different icon (or other image) in an app widget served by your app
Use a different icon for a shortcut that you attempt to add to the home screen via ACTION_CREATE_SHORTCUT
You can make multiple resolutions of the image for different screen densities. See android iconography style guide for details.
To use that icon go to AndroidManifest.xml and inside application tag use following property:
android:icon="#drawable/name_of_your_icon_file_without_extension"
Few points to note:
Use same file name for all screen densities. (e.g. ic_icon.png in all folders drawable-ldpi, drawable-mdpi, drawable-hdpi etc.)
Use transparent backgrounds for the icons
Hope this helps!

Android: Homescreen Icons different than Menu Icons

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.

How to Replace Icon and title with a png 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);

App Icon with transparent background doesn't appear

I use this image like ic_launcher for my application
(source: fotohost.by)
In my application icon is displayed without background
But in my GO launcher EX it's displayed with background
(source: fotohost.by)
In what may be the problem?
Go launcher provides the functionality to enable/disable app icon base .
You have to disable it.
I think that this is a change made by a theme of the launcher.

Change logo that appears in Android ActionBar programatically

Is there a way to change the logo that appears in the ActionBar inside an Activity instead of listing it in the Manifest?
The reason I ask is I have an app for phones where I build a similar type of bar across the top with the launcher icon in the left corner similar to the ActionBar using an ImageView.
I also allow the user to change that image to one on their phone or on the internet. I am currently making the app work for tablets and would like to just use the ActionBar instead but can't figure out how to change the image based on the user. There is no method in the ActionBar class and I could not find a way to modify the icon or logo from the resources.
Anyone know if this is possible or could suggest something I could try?
Prior to the introduction in API 14 of the setIcon and setLogo methods that Jake mentions, you appear to be able to change the ActionBar logo by grabbing the view of android.R.id.home and setting a new drawable.
ImageView logo = (ImageView) findViewById(android.R.id.home);
logo.setImageDrawable(drawable);
API 14 introduced setIcon and setLogo methods.
As for 11 through 13 there's no easy way.
You could possibly use a custom navigation and hide the regular icon/logo by having your own layout mimic its functionality.
There is a homeLayout attribute in the action bar style which allows specifying an alternate layout resource to be used but it will always throw a ClassCastException since it is instantly cast to an internal class upon inflation (bug #21842).

Categories

Resources