I read http://developer.android.com/guide/topics/ui/actionbar.html and it 
says 
 
"Using a logo instead of an icon

By default, the system uses your application icon in the action bar, as 
specified by the 
*icon*<http://developer.android.com/guide/topics/manifest/application-element.html#icon>attribute
 in the 
*<application>*<http://developer.android.com/guide/topics/manifest/application-element.html>or
 
*<activity>*<http://developer.android.com/guide/topics/manifest/activity-element.html>element.
 However, if you also specify the 
*logo*<http://developer.android.com/guide/topics/manifest/application-element.html#logo>attribute,
 then the action bar uses the logo image instead of the icon.

"

Therefore, I try to modiy my AndroidManifest.xml like this:

 

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.ActionBarStyle" 
*        android:logo="@drawable/myicon"*>
        <activity
            android:name="com.example.myactionbar.MainActivity"
            android:label="@string/app_name" 
            android:theme="@style/Theme.AppCompat.Light"
*            android:logo="@drawable/myicon"*
            >

 

Although I have set the icon attribute both at <application> and 
<activity>, it still cannot work. The app still uses ic_launcher as the 
action bar logo. Is there a correct code snippet for reference?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to