fullscreen image view

This commit is contained in:
Page Asgardius 2022-09-08 15:57:14 -07:00
parent bf462225e7
commit ceb9df7d33
2 changed files with 17 additions and 1 deletions

View file

@ -63,4 +63,20 @@ public class ImageViewer extends AppCompatActivity {
}); });
imgread.start(); 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);
}
} }

View file

@ -127,7 +127,7 @@ public class ObjectSelect extends AppCompatActivity {
else if (Name.get(i).toString().endsWith(".txt") || Name.get(i).toString().endsWith(".md")) { else if (Name.get(i).toString().endsWith(".txt") || Name.get(i).toString().endsWith(".md")) {
Img.add(R.drawable.textfile); 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); Img.add(R.drawable.imagefile);
} }
else if (Name.get(i).toString().endsWith(".opus") || Name.get(i).toString().endsWith(".ogg") else if (Name.get(i).toString().endsWith(".opus") || Name.get(i).toString().endsWith(".ogg")