Thursday, 1 February 2018

Android - How to show App logo in action bar

ActionBar actionBar = getSupportActionBar();
 // Set tab navigation mode.
 actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

 // Set below attributes to add logo in ActionBar.
 actionBar.setDisplayShowHomeEnabled(true);
 actionBar.setDisplayUseLogoEnabled(true);
 actionBar.setLogo(R.drawable.icon_tech_32);


EmoticonEmoticon

Ads

Recent Posts Widget