mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +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;
|
return hasError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO use counter instead, because in theory one attachment can appear in more than one messages
|
||||||
String getTransitionName() {
|
String getTransitionName() {
|
||||||
return String.valueOf(messageId.hashCode());
|
return String.valueOf(messageId.hashCode());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ public class ImageActivity extends BriarActivity
|
|||||||
public boolean onLoadFailed(@Nullable GlideException e,
|
public boolean onLoadFailed(@Nullable GlideException e,
|
||||||
Object model, Target<Drawable> target,
|
Object model, Target<Drawable> target,
|
||||||
boolean isFirstResource) {
|
boolean isFirstResource) {
|
||||||
|
supportStartPostponedEnterTransition();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,14 +177,14 @@ public class ImageActivity extends BriarActivity
|
|||||||
private void toggleSystemUi() {
|
private void toggleSystemUi() {
|
||||||
View decorView = getWindow().getDecorView();
|
View decorView = getWindow().getDecorView();
|
||||||
if (appBarLayout.getVisibility() == VISIBLE) {
|
if (appBarLayout.getVisibility() == VISIBLE) {
|
||||||
hideSystemUI(decorView);
|
hideSystemUi(decorView);
|
||||||
} else {
|
} else {
|
||||||
showSystemUI(decorView);
|
showSystemUi(decorView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = 16)
|
@RequiresApi(api = 16)
|
||||||
private void hideSystemUI(View decorView) {
|
private void hideSystemUi(View decorView) {
|
||||||
decorView.setSystemUiVisibility(SYSTEM_UI_FLAG_LAYOUT_STABLE
|
decorView.setSystemUiVisibility(SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
| SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
| SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
| SYSTEM_UI_FLAG_FULLSCREEN
|
| SYSTEM_UI_FLAG_FULLSCREEN
|
||||||
@@ -196,7 +197,7 @@ public class ImageActivity extends BriarActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = 16)
|
@RequiresApi(api = 16)
|
||||||
private void showSystemUI(View decorView) {
|
private void showSystemUi(View decorView) {
|
||||||
decorView.setSystemUiVisibility(
|
decorView.setSystemUiVisibility(
|
||||||
SYSTEM_UI_FLAG_LAYOUT_STABLE
|
SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
| SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
| SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center"
|
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="@color/action_bar_text"
|
android:textColor="@color/action_bar_text"
|
||||||
tools:text="Contact Name of someone who chose a long name"/>
|
tools:text="Contact Name of someone who chose a long name"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user