Added semi transparent toolbar on Home

This commit is contained in:
h4h13 2019-06-05 00:07:43 +05:30
parent 02d9eb765d
commit 2a449ef649
5 changed files with 23 additions and 27 deletions

View file

@ -136,13 +136,13 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
}
appBarLayout?.addOnOffsetChangedListener(object : AppBarStateChangeListener() {
override fun onStateChanged(appBarLayout: AppBarLayout, state: AppBarStateChangeListener.State) {
override fun onStateChanged(appBarLayout: AppBarLayout, state: State) {
val color: Int = when (state) {
AppBarStateChangeListener.State.COLLAPSED -> {
State.COLLAPSED -> {
setLightStatusbar(ColorUtil.isColorLight(ThemeStore.primaryColor(appBarLayout.context)))
ThemeStore.primaryColor(appBarLayout.context)
}
AppBarStateChangeListener.State.EXPANDED, AppBarStateChangeListener.State.IDLE -> {
State.EXPANDED, State.IDLE -> {
setLightStatusbar(false)
Color.TRANSPARENT
}