mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-31 21:37:11 +01:00
Hide actionbar on imgur images too.
This commit is contained in:
parent
dc16f83d72
commit
7bb9d14f1d
@ -81,7 +81,6 @@ public class ViewImgurMediaActivity extends AppCompatActivity implements SetAsWa
|
|||||||
@Inject
|
@Inject
|
||||||
@Named("default")
|
@Named("default")
|
||||||
SharedPreferences sharedPreferences;
|
SharedPreferences sharedPreferences;
|
||||||
private WallpaperSetter wallpaperSetter;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@ -118,8 +117,6 @@ public class ViewImgurMediaActivity extends AppCompatActivity implements SetAsWa
|
|||||||
actionBar.setHomeAsUpIndicator(upArrow);
|
actionBar.setHomeAsUpIndicator(upArrow);
|
||||||
actionBar.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.transparentActionBarAndExoPlayerControllerColor)));
|
actionBar.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.transparentActionBarAndExoPlayerControllerColor)));
|
||||||
|
|
||||||
wallpaperSetter = new WallpaperSetter();
|
|
||||||
|
|
||||||
setTitle(" ");
|
setTitle(" ");
|
||||||
|
|
||||||
String imgurId = getIntent().getStringExtra(EXTRA_IMGUR_ID);
|
String imgurId = getIntent().getStringExtra(EXTRA_IMGUR_ID);
|
||||||
|
@ -67,6 +67,7 @@ public class ViewImgurImageFragment extends Fragment {
|
|||||||
private MediaDownloader mediaDownloader;
|
private MediaDownloader mediaDownloader;
|
||||||
private ImgurMedia imgurMedia;
|
private ImgurMedia imgurMedia;
|
||||||
private boolean isDownloading = false;
|
private boolean isDownloading = false;
|
||||||
|
private boolean isActionBarHidden = false;
|
||||||
|
|
||||||
public ViewImgurImageFragment() {
|
public ViewImgurImageFragment() {
|
||||||
// Required empty public constructor
|
// Required empty public constructor
|
||||||
@ -86,6 +87,25 @@ public class ViewImgurImageFragment extends Fragment {
|
|||||||
mediaDownloader = new MediaDownloaderImpl();
|
mediaDownloader = new MediaDownloaderImpl();
|
||||||
loadImage();
|
loadImage();
|
||||||
|
|
||||||
|
imageView.setOnClickListener(view -> {
|
||||||
|
if (isActionBarHidden) {
|
||||||
|
activity.getWindow().getDecorView().setSystemUiVisibility(
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
||||||
|
isActionBarHidden = false;
|
||||||
|
} else {
|
||||||
|
activity.getWindow().getDecorView().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);
|
||||||
|
isActionBarHidden = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return rootView;
|
return rootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user