mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 14:59:18 +01:00
Replace deprecated system window insets usage
This commit is contained in:
parent
c466baaa25
commit
af47103707
@ -21,6 +21,7 @@ import android.view.animation.Animation
|
|||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
import android.widget.SeekBar
|
import android.widget.SeekBar
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
|
import androidx.core.view.WindowInsetsCompat
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.core.view.setPadding
|
import androidx.core.view.setPadding
|
||||||
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
||||||
@ -290,11 +291,12 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
|
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(binding.readerMenu) { _, insets ->
|
ViewCompat.setOnApplyWindowInsetsListener(binding.readerMenu) { _, insets ->
|
||||||
if (!window.isDefaultBar()) {
|
if (!window.isDefaultBar()) {
|
||||||
|
val systemInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||||
binding.readerMenu.setPadding(
|
binding.readerMenu.setPadding(
|
||||||
insets.systemWindowInsetLeft,
|
systemInsets.left,
|
||||||
insets.systemWindowInsetTop,
|
systemInsets.top,
|
||||||
insets.systemWindowInsetRight,
|
systemInsets.right,
|
||||||
insets.systemWindowInsetBottom
|
systemInsets.bottom
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
insets
|
insets
|
||||||
|
Loading…
Reference in New Issue
Block a user