Merge pull request #8896 from JosJuice/android-game-details-scroll

Android: Wrap game details dialog in ScrollView
This commit is contained in:
LC 2020-07-08 08:48:42 -04:00 committed by GitHub
commit a5166be995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,218 +1,223 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/frameLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:paddingBottom="24dp"
android:transitionName="card_game"> android:transitionName="card_game">
<TextView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/text_game_title" android:layout_width="match_parent"
style="@android:style/TextAppearance.Material.Headline"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:paddingStart="24dp"
android:ellipsize="end" android:paddingEnd="24dp"
tools:text="Rhythm Heaven Fever" android:paddingBottom="24dp">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/text_description" android:id="@+id/text_game_title"
style="@android:style/TextAppearance.Material.Caption" style="@android:style/TextAppearance.Material.Headline"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="24dp"
tools:text="Zany rhythm action!" android:ellipsize="end"
app:layout_constraintStart_toStartOf="parent" tools:text="Rhythm Heaven Fever"
app:layout_constraintTop_toBottomOf="@id/text_game_title" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView <TextView
android:id="@+id/banner" android:id="@+id/text_description"
android:layout_width="144dp" style="@android:style/TextAppearance.Material.Caption"
android:layout_height="48dp" android:layout_width="wrap_content"
android:layout_marginTop="16dp" android:layout_height="wrap_content"
android:layout_marginBottom="16dp" android:layout_marginTop="8dp"
tools:src="@drawable/no_banner" tools:text="Zany rhythm action!"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/text_description" /> app:layout_constraintTop_toBottomOf="@id/text_game_title" />
<View <ImageView
android:id="@+id/divider_1" android:id="@+id/banner"
android:layout_width="0dp" android:layout_width="144dp"
android:layout_height="1dp" android:layout_height="48dp"
android:background="#1F000000" android:layout_marginTop="16dp"
android:layout_marginTop="32dp" android:layout_marginBottom="16dp"
app:layout_constraintStart_toStartOf="parent" tools:src="@drawable/no_banner"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/banner" /> app:layout_constraintTop_toBottomOf="@id/text_description" />
<TextView <View
android:id="@+id/label_country" android:id="@+id/divider_1"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="1dp"
android:layout_marginTop="24dp" android:background="#1F000000"
android:gravity="start" android:layout_marginTop="32dp"
android:text="@string/game_details_country" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/divider_1" /> app:layout_constraintTop_toBottomOf="@id/banner" />
<TextView <TextView
android:id="@+id/label_company" android:id="@+id/label_country"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:gravity="start" android:gravity="start"
android:text="@string/game_details_company" android:text="@string/game_details_country"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_country" /> app:layout_constraintTop_toBottomOf="@id/divider_1" />
<TextView <TextView
android:id="@+id/label_game_id" android:id="@+id/label_company"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:gravity="start" android:gravity="start"
android:text="@string/game_details_game_id" android:text="@string/game_details_company"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_company" /> app:layout_constraintTop_toBottomOf="@id/label_country" />
<TextView <TextView
android:id="@+id/label_revision" android:id="@+id/label_game_id"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:gravity="start" android:gravity="start"
android:text="@string/game_details_revision" android:text="@string/game_details_game_id"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_game_id" /> app:layout_constraintTop_toBottomOf="@id/label_company" />
<androidx.constraintlayout.widget.Barrier <TextView
android:id="@+id/label_barrier" android:id="@+id/label_revision"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:barrierDirection="end" android:layout_marginTop="24dp"
app:constraint_referenced_ids="label_country,label_company,label_game_id,label_revision,label_file_format,label_compression,label_block_size" /> android:gravity="start"
android:text="@string/game_details_revision"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_game_id" />
<TextView <androidx.constraintlayout.widget.Barrier
android:id="@+id/text_country" android:id="@+id/label_barrier"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" app:barrierDirection="end"
android:gravity="end" app:constraint_referenced_ids="label_country,label_company,label_game_id,label_revision,label_file_format,label_compression,label_block_size" />
tools:text="United States"
app:layout_constraintStart_toEndOf="@id/label_barrier"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/label_country" />
<TextView <TextView
android:id="@+id/text_company" android:id="@+id/text_country"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:gravity="end" android:gravity="end"
tools:text="Nintendo" tools:text="United States"
app:layout_constraintStart_toEndOf="@id/label_barrier" app:layout_constraintStart_toEndOf="@id/label_barrier"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/label_company" /> app:layout_constraintBaseline_toBaselineOf="@id/label_country" />
<TextView <TextView
android:id="@+id/text_game_id" android:id="@+id/text_company"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:gravity="end" android:gravity="end"
tools:text="SOME01" tools:text="Nintendo"
app:layout_constraintStart_toEndOf="@id/label_barrier" app:layout_constraintStart_toEndOf="@id/label_barrier"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/label_game_id" /> app:layout_constraintBaseline_toBaselineOf="@id/label_company" />
<TextView <TextView
android:id="@+id/text_revision" android:id="@+id/text_game_id"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:gravity="end" android:gravity="end"
tools:text="0" tools:text="SOME01"
app:layout_constraintStart_toEndOf="@id/label_barrier" app:layout_constraintStart_toEndOf="@id/label_barrier"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/label_revision" /> app:layout_constraintBaseline_toBaselineOf="@id/label_game_id" />
<View <TextView
android:id="@+id/divider_2" android:id="@+id/text_revision"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="1dp" android:layout_height="wrap_content"
android:background="#1F000000" android:layout_marginStart="16dp"
android:layout_marginTop="32dp" android:gravity="end"
app:layout_constraintStart_toStartOf="parent" tools:text="0"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/label_barrier"
app:layout_constraintTop_toBottomOf="@id/label_revision" /> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/label_revision" />
<TextView <View
android:id="@+id/label_file_format" android:id="@+id/divider_2"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="1dp"
android:layout_marginTop="24dp" android:background="#1F000000"
android:gravity="start" android:layout_marginTop="32dp"
android:text="@string/game_details_file_format" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/divider_2" /> app:layout_constraintTop_toBottomOf="@id/label_revision" />
<TextView <TextView
android:id="@+id/label_compression" android:id="@+id/label_file_format"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:gravity="start" android:gravity="start"
android:text="@string/game_details_compression" android:text="@string/game_details_file_format"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_file_format" /> app:layout_constraintTop_toBottomOf="@id/divider_2" />
<TextView <TextView
android:id="@+id/label_block_size" android:id="@+id/label_compression"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"
android:gravity="start" android:gravity="start"
android:text="@string/game_details_block_size" android:text="@string/game_details_compression"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/label_compression" /> app:layout_constraintTop_toBottomOf="@id/label_file_format" />
<TextView <TextView
android:id="@+id/text_file_format" android:id="@+id/label_block_size"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginTop="24dp"
android:gravity="end" android:gravity="start"
tools:text="ISO (4.38 GiB)" android:text="@string/game_details_block_size"
app:layout_constraintStart_toEndOf="@id/label_barrier" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/label_compression" />
app:layout_constraintBaseline_toBaselineOf="@id/label_file_format" />
<TextView <TextView
android:id="@+id/text_compression" android:id="@+id/text_file_format"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:gravity="end" android:gravity="end"
tools:text="No Compression" tools:text="ISO (4.38 GiB)"
app:layout_constraintStart_toEndOf="@id/label_barrier" app:layout_constraintStart_toEndOf="@id/label_barrier"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/label_compression" /> app:layout_constraintBaseline_toBaselineOf="@id/label_file_format" />
<TextView <TextView
android:id="@+id/text_block_size" android:id="@+id/text_compression"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:gravity="end" android:gravity="end"
tools:text="0 B" tools:text="No Compression"
app:layout_constraintStart_toEndOf="@id/label_barrier" app:layout_constraintStart_toEndOf="@id/label_barrier"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/label_block_size" /> app:layout_constraintBaseline_toBaselineOf="@id/label_compression" />
</androidx.constraintlayout.widget.ConstraintLayout> <TextView
android:id="@+id/text_block_size"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:gravity="end"
tools:text="0 B"
app:layout_constraintStart_toEndOf="@id/label_barrier"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/label_block_size" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>