Skip to content

Commit

Permalink
Merge pull request #20 from kaisar945/main
Browse files Browse the repository at this point in the history
Improve layout avoid covering the buttons on low resolution devices
  • Loading branch information
pimterry committed Apr 10, 2024
2 parents 93e08fe + 7bf7bd6 commit 8a7b6d3
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/layout-h380dp-land/main_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.06" />
app:layout_constraintGuide_percent="@integer/guide_line_percent" />

<ImageView
android:id="@+id/logoImage"
Expand Down
20 changes: 14 additions & 6 deletions app/src/main/res/layout-h680dp/main_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.16" />
app:layout_constraintGuide_percent="@integer/guide_line_percent" />

<ImageView
android:id="@+id/logoImage"
Expand Down Expand Up @@ -44,19 +44,27 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<LinearLayout
android:id="@+id/statusDetailContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusText"
android:orientation="vertical" />
app:layout_constraintBottom_toTopOf="@+id/materialCardView">

<LinearLayout
android:id="@+id/statusDetailContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />

</ScrollView>

<com.google.android.material.card.MaterialCardView
android:id="@+id/materialCardView"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginStart="16dp"
Expand Down
19 changes: 13 additions & 6 deletions app/src/main/res/layout/main_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.18" />
app:layout_constraintGuide_percent="@integer/guide_line_percent" />

<ImageView
android:id="@+id/logoImage"
Expand All @@ -36,18 +36,25 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"/>

<LinearLayout
android:id="@+id/statusDetailContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusText"
android:orientation="vertical" />
app:layout_constraintBottom_toTopOf="@+id/materialCardView">

<LinearLayout
android:id="@+id/statusDetailContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />

</ScrollView>

<com.google.android.material.card.MaterialCardView
android:id="@+id/materialCardView"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values-h380dp-land/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="guide_line_percent" format="float" type="integer">0.06</item>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values-h380dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="guide_line_percent" format="float" type="integer">0.08</item>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values-h680dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="guide_line_percent" format="float" type="integer">0.16</item>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="guide_line_percent" format="float" type="integer">0.18</item>
</resources>

0 comments on commit 8a7b6d3

Please sign in to comment.