From ceb9df7d331f86580df6e3b6d5683e63ec00e0a4 Mon Sep 17 00:00:00 2001 From: Page Asgardius Date: Thu, 8 Sep 2022 15:57:14 -0700 Subject: [PATCH] fullscreen image view --- .../asgardius/page/s3manager/ImageViewer.java | 16 ++++++++++++++++ .../asgardius/page/s3manager/ObjectSelect.java | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/asgardius/page/s3manager/ImageViewer.java b/app/src/main/java/asgardius/page/s3manager/ImageViewer.java index 9d2d068..746d2c1 100644 --- a/app/src/main/java/asgardius/page/s3manager/ImageViewer.java +++ b/app/src/main/java/asgardius/page/s3manager/ImageViewer.java @@ -63,4 +63,20 @@ public class ImageViewer extends AppCompatActivity { }); imgread.start(); } + + @Override + public void onWindowFocusChanged(boolean hasFocus) { + super.onWindowFocusChanged(hasFocus); + + + View decorView = getWindow().getDecorView(); + decorView.setSystemUiVisibility( + View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN + | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); + + } } \ No newline at end of file diff --git a/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java b/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java index 6207990..5e9292c 100644 --- a/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java +++ b/app/src/main/java/asgardius/page/s3manager/ObjectSelect.java @@ -127,7 +127,7 @@ public class ObjectSelect extends AppCompatActivity { else if (Name.get(i).toString().endsWith(".txt") || Name.get(i).toString().endsWith(".md")) { Img.add(R.drawable.textfile); } - else if (Name.get(i).toString().endsWith(".jpg") || Name.get(i).toString().endsWith(".png") || Name.get(i).toString().endsWith(".gif")) { + else if (Name.get(i).toString().endsWith(".jpg") || Name.get(i).toString().endsWith(".jpeg") || Name.get(i).toString().endsWith(".png") || Name.get(i).toString().endsWith(".gif")) { Img.add(R.drawable.imagefile); } else if (Name.get(i).toString().endsWith(".opus") || Name.get(i).toString().endsWith(".ogg")