mirror of https://git.suyu.dev/suyu/suyu
android: frontend: Implement game grid view. (#9)
parent
5ed8d46340
commit
0e52d11ede
@ -1,81 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:clipToPadding="false"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:transitionName="card_game"
|
||||
tools:layout_width="match_parent">
|
||||
android:paddingStart="4dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="4dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:transitionName="card_game">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/card_game_art"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
app:cardCornerRadius="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_game_screen"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:adjustViewBounds="false"
|
||||
android:cropToPadding="false"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:scaleType="fitCenter" />
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_game_title_inner"
|
||||
style="@android:style/TextAppearance.Material.Subhead"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center|top"
|
||||
android:maxLines="2"
|
||||
android:paddingLeft="2dp"
|
||||
android:paddingRight="2dp"
|
||||
android:paddingTop="8dp"
|
||||
android:visibility="visible"
|
||||
tools:text="The Legend of Zelda: The Wind Waker" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_game_title"
|
||||
style="@android:style/TextAppearance.Material.Subhead"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:baselineAligned="false"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="viewStart"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/image_game_screen"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="The Legend of Zelda\nOcarina of Time 3D"
|
||||
android:textColor="@color/header_text" />
|
||||
android:maxLines="2"
|
||||
android:paddingTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/card_game_art"
|
||||
app:layout_constraintStart_toStartOf="@+id/card_game_art"
|
||||
app:layout_constraintTop_toBottomOf="@+id/card_game_art"
|
||||
tools:text="The Legend of Zelda: The Wind Waker" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_company"
|
||||
android:id="@+id/text_game_caption"
|
||||
style="@android:style/TextAppearance.Material.Caption"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/image_game_screen"
|
||||
app:layout_constraintStart_toStartOf="@+id/text_game_title"
|
||||
android:paddingTop="8dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/card_game_art"
|
||||
app:layout_constraintStart_toStartOf="@+id/card_game_art"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text_game_title"
|
||||
app:layout_constraintVertical_bias="0.842"
|
||||
tools:text="Nintendo"
|
||||
android:textColor="@color/header_subtext" />
|
||||
tools:text="Nintendo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_filename"
|
||||
style="@android:style/TextAppearance.Material.Caption"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/image_game_screen"
|
||||
app:layout_constraintStart_toStartOf="@+id/text_game_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/text_game_title"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
tools:text="Pilotwings_Resort.cxi"
|
||||
android:textColor="@color/header_subtext" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
Loading…
Reference in New Issue