feat: support API 21 with compat
This commit is contained in:
parent
c033bb0445
commit
a8ad018c44
5 changed files with 35 additions and 20 deletions
|
@ -214,7 +214,7 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
binding.root.doOnAttach {
|
||||
initActivity(this)
|
||||
window.navigationBarColor = getColor(android.R.color.transparent)
|
||||
window.navigationBarColor = ContextCompat.getColor(this, android.R.color.transparent)
|
||||
selectedOption = if (fragment != null) {
|
||||
when (fragment) {
|
||||
AnimeFragment::class.java.name -> 0
|
||||
|
@ -381,7 +381,7 @@ class MainActivity : AppCompatActivity() {
|
|||
|
||||
override fun onRestart() {
|
||||
super.onRestart()
|
||||
window.navigationBarColor = getColor(android.R.color.transparent)
|
||||
window.navigationBarColor = ContextCompat.getColor(this, android.R.color.transparent)
|
||||
}
|
||||
|
||||
private val Int.toPx get() = TypedValue.applyDimension(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue