Created
July 6, 2020 08:12
-
-
Save Div-e-Sepid/ed7129eec9c1576071656a7e7a534a82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun AppCompatActivity.setAsActionBar(toolbar: Toolbar) { | |
setSupportActionBar(toolbar) | |
supportActionBar!!.setDisplayHomeAsUpEnabled(true) | |
supportActionBar!!.setDisplayShowHomeEnabled(true) | |
toolbar.setNavigationOnClickListener { onBackPressed() } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment