fixed status bar issue
This commit is contained in:
parent
16451a2fb6
commit
3da441b02f
2 changed files with 24 additions and 18 deletions
|
@ -1,5 +1,6 @@
|
||||||
package code.name.monkey.retromusic.ui.activities
|
package code.name.monkey.retromusic.ui.activities
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
|
@ -8,6 +9,7 @@ import androidx.recyclerview.widget.DefaultItemAnimator
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
|
@ -45,13 +47,12 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), GenreDetailsContrac
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
|
||||||
setStatusbarColorAuto()
|
setStatusbarColor(Color.TRANSPARENT)
|
||||||
setNavigationbarColorAuto()
|
setNavigationbarColorAuto()
|
||||||
setTaskDescriptionColorAuto()
|
setTaskDescriptionColorAuto()
|
||||||
|
|
||||||
toggleBottomNavigationView(true)
|
|
||||||
setLightNavigationBar(true)
|
setLightNavigationBar(true)
|
||||||
|
setLightStatusbar(ColorUtil.isColorLight(ThemeStore.primaryColor(this)))
|
||||||
|
toggleBottomNavigationView(true)
|
||||||
|
|
||||||
genre = intent.extras!!.getParcelable(EXTRA_GENRE_ID)
|
genre = intent.extras!!.getParcelable(EXTRA_GENRE_ID)
|
||||||
presenter = GenreDetailsPresenter(this, genre!!.id)
|
presenter = GenreDetailsPresenter(this, genre!!.id)
|
||||||
|
@ -66,13 +67,15 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), GenreDetailsContrac
|
||||||
bannerTitle!!.setTextColor(ThemeStore.textColorPrimary(this))
|
bannerTitle!!.setTextColor(ThemeStore.textColorPrimary(this))
|
||||||
|
|
||||||
val primaryColor = ThemeStore.primaryColor(this)
|
val primaryColor = ThemeStore.primaryColor(this)
|
||||||
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
|
|
||||||
toolbar.setBackgroundColor(primaryColor)
|
|
||||||
appBarLayout.setBackgroundColor(primaryColor)
|
appBarLayout.setBackgroundColor(primaryColor)
|
||||||
ToolbarContentTintHelper.colorBackButton(toolbar!!, ThemeStore.accentColor(this))
|
toolbar.apply {
|
||||||
|
setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
|
||||||
|
setBackgroundColor(primaryColor)
|
||||||
|
setSupportActionBar(this)
|
||||||
|
ToolbarContentTintHelper.colorBackButton(this, ThemeStore.textColorSecondary(this@GenreDetailsActivity))
|
||||||
|
}
|
||||||
|
actionShuffle.setColor(ThemeStore.accentColor(this@GenreDetailsActivity))
|
||||||
title = null
|
title = null
|
||||||
setSupportActionBar(toolbar)
|
|
||||||
actionShuffle.setColor(ThemeStore.accentColor(this))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package code.name.monkey.retromusic.ui.activities
|
package code.name.monkey.retromusic.ui.activities
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
|
@ -7,6 +8,7 @@ import android.view.View
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
|
@ -29,6 +31,7 @@ import com.afollestad.materialcab.MaterialCab
|
||||||
import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator
|
import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator
|
||||||
import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager
|
import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager
|
||||||
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
|
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
|
||||||
|
|
||||||
import kotlinx.android.synthetic.main.activity_playlist_detail.*
|
import kotlinx.android.synthetic.main.activity_playlist_detail.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
@ -46,13 +49,14 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
|
||||||
setDrawUnderStatusBar()
|
setDrawUnderStatusBar()
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
setStatusbarColorAuto()
|
|
||||||
|
setStatusbarColor(Color.TRANSPARENT)
|
||||||
setNavigationbarColorAuto()
|
setNavigationbarColorAuto()
|
||||||
setTaskDescriptionColorAuto()
|
setTaskDescriptionColorAuto()
|
||||||
setLightNavigationBar(true)
|
setLightNavigationBar(true)
|
||||||
|
setLightStatusbar(ColorUtil.isColorLight(ThemeStore.primaryColor(this)))
|
||||||
toggleBottomNavigationView(true)
|
toggleBottomNavigationView(true)
|
||||||
|
|
||||||
|
|
||||||
playlist = intent.extras!!.getParcelable(EXTRA_PLAYLIST)
|
playlist = intent.extras!!.getParcelable(EXTRA_PLAYLIST)
|
||||||
songsPresenter = PlaylistSongsPresenter(this, playlist!!)
|
songsPresenter = PlaylistSongsPresenter(this, playlist!!)
|
||||||
|
|
||||||
|
@ -125,14 +129,13 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
|
||||||
actionShuffle.setColor(ThemeStore.accentColor(this))
|
actionShuffle.setColor(ThemeStore.accentColor(this))
|
||||||
|
|
||||||
val primaryColor = ThemeStore.primaryColor(this)
|
val primaryColor = ThemeStore.primaryColor(this)
|
||||||
toolbar!!.setBackgroundColor(primaryColor)
|
toolbar!!.apply {
|
||||||
appBarLayout!!.setBackgroundColor(primaryColor)
|
setBackgroundColor(primaryColor)
|
||||||
|
setSupportActionBar(toolbar)
|
||||||
|
setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
|
||||||
|
ToolbarContentTintHelper.colorBackButton(this, ThemeStore.textColorSecondary(this@PlaylistDetailActivity))
|
||||||
|
}
|
||||||
title = null
|
title = null
|
||||||
setSupportActionBar(toolbar)
|
|
||||||
toolbar!!.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
|
|
||||||
|
|
||||||
ToolbarContentTintHelper.colorBackButton(toolbar!!, ThemeStore.accentColor(this))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
|
|
Loading…
Reference in a new issue