Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve layout avoid covering the buttons on low resolution devices #20

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Loading