[android] Address review issues for image fullscreen view

This commit is contained in:
Torsten Grote
2018-11-28 17:25:27 -02:00
parent c8fa23273f
commit 7b22d3b84d
3 changed files with 6 additions and 5 deletions

View File

@@ -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());
}

View File

@@ -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

View File

@@ -40,7 +40,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:textColor="@color/action_bar_text"
tools:text="Contact Name of someone who chose a long name"/>