2

Android Studio is not showing app logo on the Action Bar.

I used following style:

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
</style>

It is showing logo in my XMl design what While i run it app logo disappear.

Like this is the output of my app

enter image description here

Rishi Paul
  • 936
  • 2
  • 8
  • 25

2 Answers2

2

To display the icon on ActionBar you have to add :

getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setIcon(R.drawable.ic_launcher);

in onCreate method.

Rajan Bhavsar
  • 1,977
  • 11
  • 25
1

Part of material-design is that the logo is not on the actionbar anymore - but you can force to get it back if you want like so: show icon in actionbar/toolbar with AppCompat-v7 21

Community
  • 1
  • 1
ligi
  • 39,001
  • 44
  • 144
  • 244