How do I make the app icon appear in the action bar?

Asked

Viewed 135 times

0

1 answer

1


Use the method setDisplayShowHomeEnabled() to view the home button space:

getSupportActionBar().setDisplayShowHomeEnabled(true);

Then the method setIcon() to set the icon you want to view:

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

Look at this response in the gringo OS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.