Skip to content

Commit 8a7b6d3

Browse files
authored
Merge pull request #20 from kaisar945/main
Improve layout avoid covering the buttons on low resolution devices
2 parents 93e08fe + 7bf7bd6 commit 8a7b6d3

File tree

7 files changed

+44
-13
lines changed

7 files changed

+44
-13
lines changed

app/src/main/res/layout-h380dp-land/main_layout.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
android:layout_width="wrap_content"
1818
android:layout_height="wrap_content"
1919
android:orientation="horizontal"
20-
app:layout_constraintGuide_percent="0.06" />
20+
app:layout_constraintGuide_percent="@integer/guide_line_percent" />
2121

2222
<ImageView
2323
android:id="@+id/logoImage"

app/src/main/res/layout-h680dp/main_layout.xml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
android:layout_width="wrap_content"
1212
android:layout_height="wrap_content"
1313
android:orientation="horizontal"
14-
app:layout_constraintGuide_percent="0.16" />
14+
app:layout_constraintGuide_percent="@integer/guide_line_percent" />
1515

1616
<ImageView
1717
android:id="@+id/logoImage"
@@ -44,19 +44,27 @@
4444
app:layout_constraintEnd_toEndOf="parent"
4545
app:layout_constraintStart_toStartOf="parent" />
4646

47-
<LinearLayout
48-
android:id="@+id/statusDetailContainer"
49-
android:layout_width="wrap_content"
50-
android:layout_height="wrap_content"
47+
<ScrollView
48+
android:layout_width="match_parent"
49+
android:layout_height="0dp"
5150
android:layout_marginStart="16dp"
5251
android:layout_marginEnd="16dp"
5352
app:layout_constrainedWidth="true"
5453
app:layout_constraintEnd_toEndOf="parent"
5554
app:layout_constraintStart_toStartOf="parent"
5655
app:layout_constraintTop_toBottomOf="@+id/statusText"
57-
android:orientation="vertical" />
56+
app:layout_constraintBottom_toTopOf="@+id/materialCardView">
57+
58+
<LinearLayout
59+
android:id="@+id/statusDetailContainer"
60+
android:layout_width="match_parent"
61+
android:layout_height="wrap_content"
62+
android:orientation="vertical" />
63+
64+
</ScrollView>
5865

5966
<com.google.android.material.card.MaterialCardView
67+
android:id="@+id/materialCardView"
6068
android:layout_height="wrap_content"
6169
android:layout_width="match_parent"
6270
android:layout_marginStart="16dp"

app/src/main/res/layout/main_layout.xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
android:layout_width="wrap_content"
1212
android:layout_height="wrap_content"
1313
android:orientation="horizontal"
14-
app:layout_constraintGuide_percent="0.18" />
14+
app:layout_constraintGuide_percent="@integer/guide_line_percent" />
1515

1616
<ImageView
1717
android:id="@+id/logoImage"
@@ -36,18 +36,25 @@
3636
app:layout_constraintEnd_toEndOf="parent"
3737
app:layout_constraintStart_toStartOf="parent"/>
3838

39-
<LinearLayout
40-
android:id="@+id/statusDetailContainer"
41-
android:layout_width="wrap_content"
42-
android:layout_height="wrap_content"
39+
<ScrollView
40+
android:layout_width="match_parent"
41+
android:layout_height="0dp"
4342
android:layout_marginTop="16dp"
4443
android:layout_marginStart="16dp"
4544
android:layout_marginEnd="16dp"
4645
app:layout_constrainedWidth="true"
4746
app:layout_constraintEnd_toEndOf="parent"
4847
app:layout_constraintStart_toStartOf="parent"
4948
app:layout_constraintTop_toBottomOf="@+id/statusText"
50-
android:orientation="vertical" />
49+
app:layout_constraintBottom_toTopOf="@+id/materialCardView">
50+
51+
<LinearLayout
52+
android:id="@+id/statusDetailContainer"
53+
android:layout_width="match_parent"
54+
android:layout_height="wrap_content"
55+
android:orientation="vertical" />
56+
57+
</ScrollView>
5158

5259
<com.google.android.material.card.MaterialCardView
5360
android:id="@+id/materialCardView"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<item name="guide_line_percent" format="float" type="integer">0.06</item>
4+
</resources>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<item name="guide_line_percent" format="float" type="integer">0.08</item>
4+
</resources>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<item name="guide_line_percent" format="float" type="integer">0.16</item>
4+
</resources>

app/src/main/res/values/dimens.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<item name="guide_line_percent" format="float" type="integer">0.18</item>
4+
</resources>

0 commit comments

Comments
 (0)