Last active
March 19, 2019 12:30
-
-
Save afreakyelf/010d57e9c6a78a7df67c31e39143b502 to your computer and use it in GitHub Desktop.
Back arrow on toolbar
This file contains 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
setSupportActionBar(toolbar) | |
supportActionBar?.setDisplayHomeAsUpEnabled(true) | |
supportActionBar?.setDisplayShowHomeEnabled(true) | |
supportActionBar?.setDisplayShowTitleEnabled(false) | |
//To change the color | |
<style name="MyToolbarStyle"> | |
<item name="android:minHeight">?actionBarSize</item> | |
<item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item> | |
<item name="theme">@style/MyToolbarTheme</item> | |
</style> | |
<style name="MyToolbarTheme"> | |
<!-- Used to tint the back arrow, menu and spinner arrow --> | |
<item name="colorControlNormal">@color/textColorNomal</item> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment