0

I want to remove app icon in action bar.

this is my code

ActionBar actionBar = getActionBar();

actionBar.setDisplayUseLogoEnabled(false);

but it not remove.

Community
  • 1
  • 1
Myo Min Han
  • 1,633
  • 2
  • 12
  • 12

1 Answers1

0

To remove the App icon from actionbar in only an activity, try this

getActionBar().setIcon(new ColorDrawable(getResources().getColor(android.R.color.transparent))); 

If You want to hide app icon in Full Application Use

actionBar = getSupportActionBar();
actionBar.setDisplayShowHomeEnabled(false);

and

actionBar.setDisplayShowTitleEnabled(false);
Lal
  • 14,726
  • 4
  • 45
  • 70
  • thank you, ok with "getActionBar().setIcon(new ColorDrawable(getResources().getColor(android.R.color.transparent)));" – Myo Min Han Jul 10 '14 at 14:59