Mercurial > cgi-bin > hgweb.cgi > SimpleResizer
comparison app/src/main/res/layout-land/activity_edit_image.xml @ 22:c29f941d09cd
Add landscape mode.
author | David Barts <n5jrn@me.com> |
---|---|
date | Tue, 23 Feb 2021 12:30:35 -0800 |
parents | app/src/main/res/layout/activity_edit_image.xml@3aaf65a7fb9c |
children | 45e4df5226c0 |
comparison
equal
deleted
inserted
replaced
21:7e7e71724770 | 22:c29f941d09cd |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | |
2 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
3 xmlns:app="http://schemas.android.com/apk/res-auto" | |
4 xmlns:tools="http://schemas.android.com/tools" | |
5 android:layout_width="match_parent" | |
6 android:layout_height="match_parent" | |
7 tools:context=".EditImage"> | |
8 | |
9 <ImageView | |
10 android:id="@+id/image" | |
11 android:layout_width="wrap_content" | |
12 android:layout_height="wrap_content" | |
13 android:layout_marginBottom="5dp" | |
14 android:adjustViewBounds="true" | |
15 android:contentDescription="Image being processed." | |
16 android:scaleType="centerInside" | |
17 app:layout_constraintBottom_toTopOf="@id/image_size" | |
18 app:layout_constraintEnd_toStartOf="@id/scale_button" | |
19 app:layout_constraintStart_toStartOf="parent" | |
20 app:layout_constraintTop_toTopOf="parent" /> | |
21 | |
22 <!-- XXX: Android is prone to gratuitous cropping, hence padding. --> | |
23 <TextView | |
24 android:id="@+id/image_size" | |
25 android:layout_width="wrap_content" | |
26 android:layout_height="wrap_content" | |
27 android:layout_marginTop="5dp" | |
28 android:paddingBottom="30dp" | |
29 android:text="TextView" | |
30 app:layout_constraintBottom_toBottomOf="parent" | |
31 app:layout_constraintEnd_toEndOf="@id/image" | |
32 app:layout_constraintStart_toStartOf="@id/image" | |
33 app:layout_constraintTop_toBottomOf="@id/image" /> | |
34 | |
35 <Button | |
36 android:id="@+id/scale_button" | |
37 android:layout_width="wrap_content" | |
38 android:layout_height="wrap_content" | |
39 android:onClick="scaleClicked" | |
40 android:text="@string/scale_text" | |
41 app:layout_constraintBottom_toTopOf="@id/cancel_button" | |
42 app:layout_constraintEnd_toStartOf="@id/rotate_button" | |
43 app:layout_constraintStart_toEndOf="@id/image" | |
44 app:layout_constraintTop_toTopOf="parent" /> | |
45 | |
46 <Button | |
47 android:id="@+id/rotate_button" | |
48 android:layout_width="wrap_content" | |
49 android:layout_height="wrap_content" | |
50 android:onClick="rotateClicked" | |
51 android:text="@string/rotate_text" | |
52 app:layout_constraintBottom_toTopOf="@id/done_button" | |
53 app:layout_constraintEnd_toEndOf="parent" | |
54 app:layout_constraintStart_toEndOf="@id/scale_button" | |
55 app:layout_constraintTop_toTopOf="parent" /> | |
56 | |
57 <Button | |
58 android:id="@+id/cancel_button" | |
59 android:layout_width="wrap_content" | |
60 android:layout_height="wrap_content" | |
61 android:onClick="cancelClicked" | |
62 android:text="@string/cancel_text" | |
63 app:layout_constraintBottom_toBottomOf="parent" | |
64 app:layout_constraintEnd_toStartOf="@id/done_button" | |
65 app:layout_constraintStart_toEndOf="@id/image" | |
66 app:layout_constraintTop_toBottomOf="@id/scale_button" /> | |
67 | |
68 <Button | |
69 android:id="@+id/done_button" | |
70 android:layout_width="wrap_content" | |
71 android:layout_height="wrap_content" | |
72 android:onClick="doneClicked" | |
73 android:text="@string/done_text" | |
74 app:layout_constraintBottom_toBottomOf="parent" | |
75 app:layout_constraintEnd_toEndOf="parent" | |
76 app:layout_constraintStart_toEndOf="@id/cancel_button" | |
77 app:layout_constraintTop_toBottomOf="@id/rotate_button" /> | |
78 | |
79 <ProgressBar | |
80 android:id="@+id/progress_bar" | |
81 android:layout_width="wrap_content" | |
82 android:layout_height="wrap_content" | |
83 android:indeterminate="true" | |
84 android:visibility="invisible" | |
85 app:layout_constraintBottom_toBottomOf="parent" | |
86 app:layout_constraintEnd_toEndOf="parent" | |
87 app:layout_constraintStart_toStartOf="parent" | |
88 app:layout_constraintTop_toTopOf="parent" /> | |
89 | |
90 </androidx.constraintlayout.widget.ConstraintLayout> |