Search code examples
androidandroid-actionbarlauncher

How to hide App icon but keep Up button in Action Bar Android


I am programming an application which using Slide Bar. I tried a sample from Google with Navigation Drawer.

Here is link download:

http://developer.android.com/shareables/training/NavigationDrawer.zip However I meet a problem. My application doesn't need Application Icon(ic_launcher.png) but keep Up button (ic_drawer.png).

I hide title by using: getActionBar().setDisplayShowTitleEnabled(false); and setDisplayShowHomeEnabled(false)but It's doesn't hide App Icon.

Please help me solve this problem. This sample project doesn't have "style.xml" file


Solution

  • you can try

    actionbar.setIcon(R.color.transparent);