diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-10-23 14:56:15 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-10-23 14:56:15 +0000 |
commit | 9b65b27d56b6c0b9ab16f4bd801fb856f13ae213 (patch) | |
tree | 3d422681c2bba607489d5c52595618b944d1d035 /app/src/main | |
parent | d090a21f9d197cc299fa2ffb0da7941ac5bed5aa (diff) | |
download | infinity-for-reddit-9b65b27d56b6c0b9ab16f4bd801fb856f13ae213.tar infinity-for-reddit-9b65b27d56b6c0b9ab16f4bd801fb856f13ae213.tar.gz infinity-for-reddit-9b65b27d56b6c0b9ab16f4bd801fb856f13ae213.tar.bz2 infinity-for-reddit-9b65b27d56b6c0b9ab16f4bd801fb856f13ae213.tar.lz infinity-for-reddit-9b65b27d56b6c0b9ab16f4bd801fb856f13ae213.tar.xz infinity-for-reddit-9b65b27d56b6c0b9ab16f4bd801fb856f13ae213.tar.zst infinity-for-reddit-9b65b27d56b6c0b9ab16f4bd801fb856f13ae213.zip |
Fix immersive interface in ViewMultiRedditDetailActivity on Android 11.
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java index b2280232..1af66861 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java @@ -6,6 +6,7 @@ import android.os.Build; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; +import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Toast; @@ -121,7 +122,13 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT } if (isImmersiveInterface()) { - window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | + View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | + View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); + } else { + window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); + } adjustToolbar(toolbar); } } |