Skip to content

Commit

Permalink
images aren't cut off anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
DevEmperor committed Mar 4, 2024
1 parent 06e837c commit 4d483bb
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 37 deletions.
43 changes: 24 additions & 19 deletions app/src/main/res/layout/activity_create_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,31 @@
android:id="@+id/retry_image_btn"
android:visibility="gone" />

<com.jsibbold.zoomage.ZoomageView
<androidx.wear.widget.BoxInsetLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:layout_marginHorizontal="24dp"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:id="@+id/create_image_iv"
android:transitionName="image"
android:visibility="gone"
app:zoomage_restrictBounds="false"
app:zoomage_animateOnReset="true"
app:zoomage_autoResetMode="UNDER"
app:zoomage_autoCenter="true"
app:zoomage_zoomable="true"
app:zoomage_translatable="true"
app:zoomage_minScale="0.6"
app:zoomage_maxScale="8"
app:zoomage_doubleTapToZoom="true"/>
android:layout_height="wrap_content">

<com.jsibbold.zoomage.ZoomageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:id="@+id/create_image_iv"
android:transitionName="image"
android:visibility="gone"
app:zoomage_restrictBounds="false"
app:zoomage_animateOnReset="true"
app:zoomage_autoResetMode="UNDER"
app:zoomage_autoCenter="true"
app:zoomage_zoomable="true"
app:zoomage_translatable="true"
app:zoomage_minScale="0.6"
app:zoomage_maxScale="8"
app:zoomage_doubleTapToZoom="true"
app:layout_boxedEdges="all"/>

</androidx.wear.widget.BoxInsetLayout>

<ImageButton
android:layout_width="64dp"
Expand Down
55 changes: 37 additions & 18 deletions app/src/main/res/layout/activity_open_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:paddingHorizontal="24dp"
android:fillViewport="false"
android:id="@+id/open_image_sv">

Expand All @@ -13,24 +12,29 @@
android:layout_height="wrap_content"
android:orientation="vertical">

<com.jsibbold.zoomage.ZoomageView
<androidx.wear.widget.BoxInsetLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:id="@+id/open_image_iv"
android:transitionName="image"
app:zoomage_restrictBounds="false"
app:zoomage_animateOnReset="true"
app:zoomage_autoResetMode="UNDER"
app:zoomage_autoCenter="true"
app:zoomage_zoomable="true"
app:zoomage_translatable="true"
app:zoomage_minScale="0.6"
app:zoomage_maxScale="8"
app:zoomage_doubleTapToZoom="true"/>
android:layout_height="wrap_content">

<com.jsibbold.zoomage.ZoomageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:id="@+id/open_image_iv"
android:transitionName="image"
app:zoomage_restrictBounds="false"
app:zoomage_animateOnReset="true"
app:zoomage_autoResetMode="UNDER"
app:zoomage_autoCenter="true"
app:zoomage_zoomable="true"
app:zoomage_translatable="true"
app:zoomage_minScale="0.6"
app:zoomage_maxScale="8"
app:zoomage_doubleTapToZoom="true"
app:layout_boxedEdges="all"/>
</androidx.wear.widget.BoxInsetLayout>

<ImageButton
android:layout_width="64dp"
Expand All @@ -49,6 +53,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="24dp"
android:textSize="16sp"
android:textColor="@color/wristassist_purple"
android:textAlignment="center"
Expand All @@ -61,6 +66,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="24dp"
android:textSize="18sp"
android:textColor="@color/wristassist_purple"
android:textStyle="bold|italic"
Expand All @@ -71,6 +77,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="24dp"
android:textSize="16sp"
android:textAlignment="center"
android:id="@+id/open_image_prompt_tv"/>
Expand All @@ -80,6 +87,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="24dp"
android:textSize="18sp"
android:textColor="@color/wristassist_purple"
android:textStyle="bold|italic"
Expand All @@ -91,6 +99,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="24dp"
android:textSize="16sp"
android:textAlignment="center"
android:id="@+id/open_image_revised_prompt_tv"/>
Expand All @@ -100,6 +109,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="24dp"
android:textSize="18sp"
android:textColor="@color/wristassist_purple"
android:textStyle="bold|italic"
Expand All @@ -110,6 +120,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="24dp"
android:textSize="16sp"
android:textAlignment="center"
android:id="@+id/open_image_model_tv"/>
Expand All @@ -119,6 +130,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="24dp"
android:textSize="18sp"
android:textColor="@color/wristassist_purple"
android:textStyle="bold|italic"
Expand All @@ -130,6 +142,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="24dp"
android:textSize="16sp"
android:textAlignment="center"
android:id="@+id/open_image_quality_tv"/>
Expand All @@ -139,6 +152,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="24dp"
android:textSize="18sp"
android:textColor="@color/wristassist_purple"
android:textStyle="bold|italic"
Expand All @@ -149,6 +163,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="24dp"
android:textSize="16sp"
android:textAlignment="center"
android:id="@+id/open_image_size_tv"/>
Expand All @@ -158,6 +173,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="24dp"
android:textSize="18sp"
android:textColor="@color/wristassist_purple"
android:textStyle="bold|italic"
Expand All @@ -169,6 +185,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="24dp"
android:textSize="16sp"
android:textAlignment="center"
android:id="@+id/open_image_style_tv"/>
Expand All @@ -178,6 +195,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginHorizontal="24dp"
android:textSize="18sp"
android:textColor="@color/wristassist_purple"
android:textStyle="bold|italic"
Expand All @@ -188,6 +206,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="24dp"
android:textSize="16sp"
android:textAlignment="center"
android:id="@+id/open_image_created_tv"/>
Expand Down

0 comments on commit 4d483bb

Please sign in to comment.