tweak min/max heights
This commit is contained in:
@@ -10,12 +10,16 @@ import java.util.List;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import me.grishka.appkit.utils.V;
|
||||||
|
|
||||||
public class PhotoLayoutHelper{
|
public class PhotoLayoutHelper{
|
||||||
public static final int MAX_WIDTH=1000;
|
public static final int MAX_WIDTH=1000;
|
||||||
public static final int MAX_HEIGHT=1400;
|
public static final int MAX_HEIGHT=1700;
|
||||||
public static final int MIN_HEIGHT=250;
|
|
||||||
public static final float GAP=1.5f;
|
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
|
@NonNull
|
||||||
public static TiledLayoutResult processThumbs(List<Attachment> thumbs){
|
public static TiledLayoutResult processThumbs(List<Attachment> thumbs){
|
||||||
float maxRatio=MAX_WIDTH/(float)MAX_HEIGHT;
|
float maxRatio=MAX_WIDTH/(float)MAX_HEIGHT;
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginEnd="40dp">
|
android:layout_marginEnd="40dp"
|
||||||
|
android:minWidth="40dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user