diff app/src/main/res/layout/activity_edit_image.xml @ 2:06825e49f7aa

Got it scaling and rotating, needs settings, etc.
author David Barts <n5jrn@me.com>
date Sun, 07 Feb 2021 21:08:34 -0800
parents 13935000c2d9
children 884092efe31a
line wrap: on
line diff
--- a/app/src/main/res/layout/activity_edit_image.xml	Mon Feb 01 08:30:12 2021 -0800
+++ b/app/src/main/res/layout/activity_edit_image.xml	Sun Feb 07 21:08:34 2021 -0800
@@ -6,13 +6,70 @@
     android:layout_height="match_parent"
     tools:context=".EditImage">
 
-    <TextView
-        android:id="@+id/image_status_report"
+    <ImageView
+        android:id="@+id/image"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="TextView"
-        app:layout_constraintBottom_toBottomOf="parent"
+        android:layout_marginBottom="5dp"
+        android:contentDescription="Image being processed."
+        android:scaleType="centerInside"
+        app:layout_constraintBottom_toTopOf="@id/scale_button"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/image_size"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="5dp"
+        android:text="TextView"
+        app:layout_constraintStart_toStartOf="@id/image"
+        app:layout_constraintEnd_toEndOf="@id/image"
+        app:layout_constraintTop_toBottomOf="@id/image" />
+
+    <Button
+        android:id="@+id/scale_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:onClick="scaleClicked"
+        android:text="@string/scale_text"
+        app:layout_constraintBottom_toTopOf="@id/cancel_button"
+        app:layout_constraintEnd_toStartOf="@id/rotate_button"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/image_size" />
+
+    <Button
+        android:id="@+id/rotate_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:onClick="rotateClicked"
+        android:text="@string/rotate_text"
+        app:layout_constraintBottom_toTopOf="@id/done_button"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/scale_button"
+        app:layout_constraintTop_toBottomOf="@id/image_size" />
+
+    <Button
+        android:id="@+id/cancel_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:onClick="cancelClicked"
+        android:text="@string/cancel_text"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/done_button"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/scale_button" />
+
+    <Button
+        android:id="@+id/done_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:onClick="doneClicked"
+        android:text="@string/done_text"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/cancel_button"
+        app:layout_constraintTop_toBottomOf="@id/rotate_button" />
+
 </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file