Revert edge to edge
This was a bigger headache than it was worth. To note, phone landscape wasn't considered, so the navbar overlaps the content on the side. Additionally, the ability to programatically control the navbar scrim is missing, so it'd have to manually be added.
This commit is contained in:
@@ -11,9 +11,6 @@ import androidx.annotation.MenuRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.appcompat.widget.TooltipCompat
|
||||
import androidx.core.graphics.Insets
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.google.android.material.chip.Chip
|
||||
import com.google.android.material.chip.ChipGroup
|
||||
@@ -120,11 +117,3 @@ inline fun ChipGroup.setChips(
|
||||
addView(chip)
|
||||
}
|
||||
}
|
||||
|
||||
inline fun View.applyInsets(noinline block: (view: View, systemInsets: Insets) -> Unit) {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(this) { view, insets ->
|
||||
val systemInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
block(view, systemInsets)
|
||||
insets
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,7 @@
|
||||
package eu.kanade.tachiyomi.util.view
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.view.View
|
||||
import android.view.Window
|
||||
import androidx.annotation.RequiresApi
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.P)
|
||||
fun Window.edgeToEdge(lightSystemUi: Boolean = false) {
|
||||
decorView.systemUiVisibility = when {
|
||||
// Handle light status and navigation bars programmatically to avoid duplicate themes
|
||||
lightSystemUi -> {
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
|
||||
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR or
|
||||
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
|
||||
}
|
||||
else -> {
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE or
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
}
|
||||
}
|
||||
|
||||
navigationBarColor = Color.TRANSPARENT
|
||||
}
|
||||
|
||||
fun Window.showBar() {
|
||||
decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
|
||||
|
||||
Reference in New Issue
Block a user