ActionBar setDisplayHomeAsUpEnabled (true) vs setDisplayShowHomeEnabled (true). Who cares?

The name pretty much speaks for itself. What are the exact differences? I will lay out the sample code below.

actionbar = getSupportActionBar(); actionbar.setDisplayHomeAsUpEnabled(true); actionbar.setDisplayShowHomeEnabled(true); 
+13
source share
1 answer

The documentation pretty much explains itself.

ActionBar.setDisplayShowHomeEnabled() indicates whether the Home button is displayed.

ActionBar.setDisplayHomeAsUpEnabled() indicates whether the Home button has an arrow used for Up Navigation next to it.

+18
source

Source: https://habr.com/ru/post/969598/


All Articles