tweak min/max heights

This commit is contained in:
sk 2023-06-13 10:07:30 +02:00
parent e3199c009e
commit 08dc122b6b
2 changed files with 8 additions and 3 deletions

View File

@ -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<Attachment> thumbs){
float maxRatio=MAX_WIDTH/(float)MAX_HEIGHT;

View File

@ -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">
<LinearLayout
android:layout_width="wrap_content"