Android: How to change the ActionBar “Home” Icon to be something other than the app icon?

前端 未结 8 1305
醉酒成梦
醉酒成梦 2020-11-28 19:17

My application\'s main icon consists of two parts in one image: a logo and a few letters below it. This works well for the launcher icon for the app, but when the icon appea

8条回答
  •  春和景丽
    2020-11-28 19:34

    Inspired by TheIT, I just got this to work by manipulating the manifest file but in a slightly different fashion. Set the icon in the application setting so that the majority of the activities get the icon. On the activity where you want to show the logo, add the android:logo attribute to the activity declaration. In the following example, only LogoActivity should have the logo, while the others will default to icon.

    
    
        
    
        
    
        
    
    
    

    Hope this helps someone else out!

提交回复
热议问题