diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/PhotoLayoutHelper.java b/mastodon/src/main/java/org/joinmastodon/android/ui/PhotoLayoutHelper.java index f6544b879..86e1962ce 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/PhotoLayoutHelper.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/PhotoLayoutHelper.java @@ -10,12 +10,16 @@ import java.util.List; import androidx.annotation.NonNull; +import me.grishka.appkit.utils.V; + public class PhotoLayoutHelper{ public static final int MAX_WIDTH=1000; - public static final int MAX_HEIGHT=1400; - public static final int MIN_HEIGHT=250; + public static final int MAX_HEIGHT=1700; public static final float GAP=1.5f; + // 2 * margin + close button height - gap. i don't know if the gap subtraction is correct + public static final int MIN_HEIGHT = Math.round(V.dp(2 * 12) + V.dp(40) - GAP); + @NonNull public static TiledLayoutResult processThumbs(List thumbs){ float maxRatio=MAX_WIDTH/(float)MAX_HEIGHT; diff --git a/mastodon/src/main/res/layout/overlay_image_alt_text.xml b/mastodon/src/main/res/layout/overlay_image_alt_text.xml index 713926ea8..ff7ed747d 100644 --- a/mastodon/src/main/res/layout/overlay_image_alt_text.xml +++ b/mastodon/src/main/res/layout/overlay_image_alt_text.xml @@ -43,7 +43,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:layout_marginEnd="40dp"> + android:layout_marginEnd="40dp" + android:minWidth="40dp">