mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
fix a glitch at toggling fullscreen mode in split screen
This commit is contained in:
parent
8d508bd883
commit
b274f9ad57
1 changed files with 5 additions and 1 deletions
|
@ -27,6 +27,7 @@ import android.view.View
|
|||
import android.view.WindowManager
|
||||
import android.view.animation.DecelerateInterpolator
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.exifinterface.media.ExifInterface
|
||||
import androidx.print.PrintHelper
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
|
@ -323,6 +324,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
private fun initContinue() {
|
||||
if (intent.extras?.containsKey(IS_VIEW_INTENT) == true) {
|
||||
if (isShowHiddenFlagNeeded()) {
|
||||
|
@ -368,7 +370,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
window.decorView.setOnSystemUiVisibilityChangeListener { visibility ->
|
||||
mIsFullScreen = if (visibility and View.SYSTEM_UI_FLAG_LOW_PROFILE == 0) {
|
||||
mIsFullScreen = if (isNougatPlus() && isInMultiWindowMode) {
|
||||
visibility and View.SYSTEM_UI_FLAG_LOW_PROFILE != 0
|
||||
} else if (visibility and View.SYSTEM_UI_FLAG_LOW_PROFILE == 0) {
|
||||
false
|
||||
} else {
|
||||
visibility and View.SYSTEM_UI_FLAG_FULLSCREEN != 0
|
||||
|
|
Loading…
Reference in a new issue