Skip to content

Commit b121099

Browse files
committed
make checkout status scrollable on ultra small devices
1 parent 65da472 commit b121099

File tree

2 files changed

+42
-36
lines changed

2 files changed

+42
-36
lines changed

ui/src/main/res/layout/view_checkout_qrcode.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
android:textSize="14sp" />
7373

7474
<Button
75-
style="@style/Widget.MaterialComponents.Button.TextButton"
75+
style="@style/SnabbleButton.TextButton"
7676
android:id="@+id/abort"
7777
android:layout_width="wrap_content"
7878
android:layout_height="wrap_content"

ui/src/main/res/layout/view_checkout_status.xml

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,53 @@
55
android:layout_width="match_parent"
66
android:layout_height="wrap_content">
77

8-
<LinearLayout
8+
<ScrollView
99
android:layout_width="match_parent"
1010
android:layout_height="match_parent"
11-
android:orientation="vertical"
12-
android:gravity="center">
13-
<io.snabble.sdk.ui.scanner.BarcodeView
14-
android:id="@+id/checkout_id_code"
15-
android:layout_width="match_parent"
16-
android:layout_height="168dp"
17-
android:background="?android:attr/windowBackground"
18-
app:format="DATA_MATRIX"
19-
tools:ignore="RtlHardcoded" />
20-
21-
<TextView
22-
android:id="@+id/message"
11+
android:layout_above="@+id/cancel"
12+
android:fillViewport="true">
13+
<LinearLayout
2314
android:layout_width="match_parent"
2415
android:layout_height="wrap_content"
25-
android:layout_gravity="center"
26-
android:gravity="center"
27-
android:padding="16dp"
28-
android:text="@string/Snabble.Payment.presentCode"
29-
android:textSize="17sp" />
16+
android:orientation="vertical"
17+
android:gravity="center">
18+
<io.snabble.sdk.ui.scanner.BarcodeView
19+
android:id="@+id/checkout_id_code"
20+
android:layout_width="match_parent"
21+
android:layout_height="168dp"
22+
android:background="?android:attr/windowBackground"
23+
app:format="DATA_MATRIX"
24+
tools:ignore="RtlHardcoded" />
3025

31-
<ProgressBar
32-
android:layout_width="wrap_content"
33-
android:layout_height="wrap_content"
34-
android:layout_marginTop="16dp"
35-
android:indeterminate="true"/>
26+
<TextView
27+
android:id="@+id/message"
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:layout_gravity="center"
31+
android:gravity="center"
32+
android:padding="16dp"
33+
android:text="@string/Snabble.Payment.presentCode"
34+
android:textSize="17sp" />
3635

37-
<TextView
38-
android:id="@+id/waiting"
39-
android:layout_width="match_parent"
40-
android:layout_height="wrap_content"
41-
android:layout_gravity="center"
42-
android:gravity="center"
43-
android:paddingTop="4dp"
44-
android:paddingLeft="16dp"
45-
android:paddingRight="16dp"
46-
android:text="@string/Snabble.Payment.waiting"
47-
android:textSize="17sp" />
48-
</LinearLayout>
36+
<ProgressBar
37+
android:layout_width="wrap_content"
38+
android:layout_height="wrap_content"
39+
android:layout_marginTop="16dp"
40+
android:indeterminate="true"/>
41+
42+
<TextView
43+
android:id="@+id/waiting"
44+
android:layout_width="match_parent"
45+
android:layout_height="wrap_content"
46+
android:layout_gravity="center"
47+
android:gravity="center"
48+
android:paddingTop="4dp"
49+
android:paddingLeft="16dp"
50+
android:paddingRight="16dp"
51+
android:text="@string/Snabble.Payment.waiting"
52+
android:textSize="17sp" />
53+
</LinearLayout>
54+
</ScrollView>
4955

5056
<Button
5157
style="@style/Widget.MaterialComponents.Button.TextButton"

0 commit comments

Comments
 (0)