summaryrefslogtreecommitdiff
path: root/Source/Android/app/src
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2022-04-23 10:25:48 +0200
committerGitHub <noreply@github.com>2022-04-23 10:25:48 +0200
commit69ca38d35581c382d917f4ad2d9414ec34fc4a69 (patch)
treeb611ab54411af29825b2bd774efb6500c39e7766 /Source/Android/app/src
parent56bb965ab944bd01bf511df31b7c9d91f8e62bd4 (diff)
parent6eb911165722d0e3e254f92e8aab29b54497bd0e (diff)
Merge pull request #10600 from t895/modern-card
Android: Modernize game card
Diffstat (limited to 'Source/Android/app/src')
-rw-r--r--Source/Android/app/src/main/res/layout/card_game.xml90
1 files changed, 47 insertions, 43 deletions
diff --git a/Source/Android/app/src/main/res/layout/card_game.xml b/Source/Android/app/src/main/res/layout/card_game.xml
index 84e0cf503b..fe807f2af1 100644
--- a/Source/Android/app/src/main/res/layout/card_game.xml
+++ b/Source/Android/app/src/main/res/layout/card_game.xml
@@ -1,57 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout 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"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- tools:layout_width="160dp"
- android:layout_height="249dp"
- android:transitionName="card_game"
- android:focusable="true"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackground"
android:clickable="true"
- android:foreground="?android:attr/selectableItemBackground"
- app:cardCornerRadius="8dp">
+ android:clipToPadding="false"
+ android:focusable="true"
+ android:orientation="vertical"
+ android:paddingStart="4dp"
+ android:paddingTop="8dp"
+ android:paddingEnd="4dp"
+ android:transitionName="card_game"
+ tools:layout_width="160dp">
- <LinearLayout
+ <androidx.cardview.widget.CardView
+ android:id="@+id/card_game_art"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ android:layout_height="159dp"
+ android:layout_gravity="center"
+ app:cardCornerRadius="4dp"
+ tools:layout_width="140dp">
<ImageView
android:id="@+id/image_game_screen"
android:layout_width="match_parent"
- android:layout_height="0dp"
+ android:layout_height="match_parent"
android:layout_weight="1"
- tools:src="@drawable/placeholder_screenshot"
- tools:scaleType="centerCrop"/>
-
- <TextView
- android:id="@+id/text_game_title"
- style="@android:style/TextAppearance.Material.Subhead"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:layout_marginTop="16dp"
- android:ellipsize="end"
- android:lines="1"
- android:maxLines="1"
- tools:text="The Legend of Zelda: The Wind Waker"/>
-
- <TextView
- android:id="@+id/text_game_caption"
- style="@android:style/TextAppearance.Material.Caption"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
- android:layout_marginTop="8dp"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:ellipsize="end"
- android:lines="1"
- android:maxLines="1"
- tools:text="Nintendo"/>
+ tools:scaleType="centerCrop"
+ tools:src="@drawable/placeholder_screenshot" />
+ </androidx.cardview.widget.CardView>
- </LinearLayout>
+ <TextView
+ android:id="@+id/text_game_title"
+ style="@android:style/TextAppearance.Material.Subhead"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="start"
+ android:layout_marginTop="8dp"
+ android:ellipsize="end"
+ android:maxLines="2"
+ tools:layout_width="140dp"
+ tools:text="The Legend of Zelda: The Wind Waker" />
-</androidx.cardview.widget.CardView>
+ <TextView
+ android:id="@+id/text_game_caption"
+ style="@android:style/TextAppearance.Material.Caption"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="start"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
+ android:ellipsize="end"
+ android:lines="1"
+ android:maxLines="1"
+ tools:layout_width="140dp"
+ tools:text="Nintendo" />
+</LinearLayout>