Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to set a tool bar inside my mainactivity to set a navigation drawer, and then came across these two lines of code.

I tried google but no specific answer.

Please explain to me what does below lines of code do :

getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);


and also what is the use of getSupportActionBar ? does it returns the toolbar ?

What I have tried:

Tried google but not straight answer for the query. Please take a look at the code and explain to me. Thank you in advance.
Posted
Updated 5-Jul-20 1:48am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900