libpdfviewer: update to PdfViewer 16
commit
6e8fdb56a5
@ -1 +1 @@
|
||||
Subproject commit cc3d3bf299ae11f8f72ae8d64cbf19b340f9a996
|
||||
Subproject commit 5f07d5a4159bb99eee2f6143d1297f03b45bba58
|
@ -1,19 +1,20 @@
|
||||
package app.grapheneos.pdfviewer.ktx
|
||||
|
||||
import android.view.View
|
||||
import androidx.core.view.ViewCompat
|
||||
import android.view.Window
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.WindowInsetsControllerCompat
|
||||
|
||||
private val systemBars = WindowInsetsCompat.Type.statusBars()
|
||||
|
||||
fun View.hideSystemUi() {
|
||||
val controller = ViewCompat.getWindowInsetsController(this) ?: return
|
||||
fun View.hideSystemUi(window: Window) {
|
||||
val controller = WindowCompat.getInsetsController(window, this)
|
||||
controller.systemBarsBehavior =
|
||||
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
||||
controller.hide(systemBars)
|
||||
}
|
||||
|
||||
fun View.showSystemUi() {
|
||||
ViewCompat.getWindowInsetsController(this)?.show(systemBars)
|
||||
fun View.showSystemUi(window: Window) {
|
||||
WindowCompat.getInsetsController(window, this).show(systemBars)
|
||||
}
|
||||
|
Loading…
Reference in New Issue