mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-25 09:51:02 +00:00
feat: support API 21 with compat
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user