mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
[android] Address review issues for image fullscreen view
This commit is contained in:
@@ -75,6 +75,7 @@ public class AttachmentItem implements Parcelable {
|
||||
return hasError;
|
||||
}
|
||||
|
||||
// TODO use counter instead, because in theory one attachment can appear in more than one messages
|
||||
String getTransitionName() {
|
||||
return String.valueOf(messageId.hashCode());
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ public class ImageActivity extends BriarActivity
|
||||
public boolean onLoadFailed(@Nullable GlideException e,
|
||||
Object model, Target<Drawable> target,
|
||||
boolean isFirstResource) {
|
||||
supportStartPostponedEnterTransition();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -176,14 +177,14 @@ public class ImageActivity extends BriarActivity
|
||||
private void toggleSystemUi() {
|
||||
View decorView = getWindow().getDecorView();
|
||||
if (appBarLayout.getVisibility() == VISIBLE) {
|
||||
hideSystemUI(decorView);
|
||||
hideSystemUi(decorView);
|
||||
} else {
|
||||
showSystemUI(decorView);
|
||||
showSystemUi(decorView);
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = 16)
|
||||
private void hideSystemUI(View decorView) {
|
||||
private void hideSystemUi(View decorView) {
|
||||
decorView.setSystemUiVisibility(SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| SYSTEM_UI_FLAG_FULLSCREEN
|
||||
@@ -196,7 +197,7 @@ public class ImageActivity extends BriarActivity
|
||||
}
|
||||
|
||||
@RequiresApi(api = 16)
|
||||
private void showSystemUI(View decorView) {
|
||||
private void showSystemUi(View decorView) {
|
||||
decorView.setSystemUiVisibility(
|
||||
SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
|
||||
Reference in New Issue
Block a user