diff options
Diffstat (limited to 'src/android/app/src/main/res')
-rw-r--r-- | src/android/app/src/main/res/layout/card_game.xml | 119 | ||||
-rw-r--r-- | src/android/app/src/main/res/layout/fragment_grid.xml | 23 | ||||
-rw-r--r-- | src/android/app/src/main/res/values/dimens.xml | 2 |
3 files changed, 70 insertions, 74 deletions
diff --git a/src/android/app/src/main/res/layout/card_game.xml b/src/android/app/src/main/res/layout/card_game.xml index 217f02d34..a0d453719 100644 --- a/src/android/app/src/main/res/layout/card_game.xml +++ b/src/android/app/src/main/res/layout/card_game.xml @@ -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" + android:id="@+id/text_game_title_inner" style="@android:style/TextAppearance.Material.Subhead" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:baselineAligned="false" + android:layout_width="match_parent" + android:layout_height="match_parent" 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: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" /> - <TextView - android:id="@+id/text_company" - 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.842" - tools:text="Nintendo" - android:textColor="@color/header_subtext" /> + </androidx.cardview.widget.CardView> - <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" /> + <TextView + android:id="@+id/text_game_title" + style="@android:style/TextAppearance.Material.Subhead" + android:layout_width="150dp" + android:layout_height="wrap_content" + android:ellipsize="end" + 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" /> - </androidx.constraintlayout.widget.ConstraintLayout> + <TextView + android:id="@+id/text_game_caption" + style="@android:style/TextAppearance.Material.Caption" + android:layout_width="150dp" + android:layout_height="wrap_content" + android:ellipsize="end" + android:lines="1" + android:maxLines="1" + 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" + tools:text="Nintendo" /> -</androidx.cardview.widget.CardView> +</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/src/android/app/src/main/res/layout/fragment_grid.xml b/src/android/app/src/main/res/layout/fragment_grid.xml index f5b6c2e19..01399e18d 100644 --- a/src/android/app/src/main/res/layout/fragment_grid.xml +++ b/src/android/app/src/main/res/layout/fragment_grid.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="match_parent"> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent"> <androidx.swiperefreshlayout.widget.SwipeRefreshLayout - android:id="@+id/refresh_grid_games" - android:layout_width="match_parent" + android:id="@+id/swipe_refresh" + android:layout_width="wrap_content" android:layout_height="wrap_content"> <RelativeLayout @@ -22,12 +22,13 @@ android:textSize="18sp" android:gravity="center" /> - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/grid_games" - android:layout_width="match_parent" - android:layout_height="match_parent" - tools:listitem="@layout/card_game" /> + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/grid_games" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:clipToPadding="false" + tools:listitem="@layout/card_game" /> </RelativeLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> -</FrameLayout>
\ No newline at end of file +</FrameLayout> diff --git a/src/android/app/src/main/res/values/dimens.xml b/src/android/app/src/main/res/values/dimens.xml index a3bb0c2c5..0b028a167 100644 --- a/src/android/app/src/main/res/values/dimens.xml +++ b/src/android/app/src/main/res/values/dimens.xml @@ -6,7 +6,7 @@ <dimen name="spacing_list">64dp</dimen> <dimen name="spacing_fab">72dp</dimen> <dimen name="menu_width">256dp</dimen> - <dimen name="card_width">135dp</dimen> + <dimen name="card_width">150dp</dimen> <dimen name="dialog_margin">20dp</dimen> <dimen name="elevated_app_bar">3dp</dimen> |