mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-17 06:49:18 +01:00
bac7c526ef
The entire layout is now selectable for grid items rather than just the card, this greatly increases the visibility of the selection when not in touch mode as the contrast of a darken effect on the icon can be minimal depending on how dark the icon already is.
55 lines
2.0 KiB
XML
55 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<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:id="@+id/item_click_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:focusable="true"
|
|
android:foreground="@drawable/rounded_selectable_item_background"
|
|
android:orientation="vertical">
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/item_card"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="10dp"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="2dp">
|
|
|
|
<ImageView
|
|
android:id="@+id/icon"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:adjustViewBounds="true"
|
|
android:contentDescription="@string/icon"
|
|
tools:src="@drawable/default_icon" />
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<TextView
|
|
android:id="@+id/text_title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:ellipsize="marquee"
|
|
android:marqueeRepeatLimit="marquee_forever"
|
|
android:singleLine="true"
|
|
android:textColor="?android:attr/textColorPrimary"
|
|
android:textSize="12sp"
|
|
tools:text="Title" />
|
|
|
|
<TextView
|
|
android:id="@+id/text_subtitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="10dp"
|
|
android:layout_marginEnd="10dp"
|
|
android:layout_marginBottom="10dp"
|
|
android:ellipsize="marquee"
|
|
android:marqueeRepeatLimit="marquee_forever"
|
|
android:singleLine="true"
|
|
android:textSize="12sp"
|
|
tools:text="Subtitle" />
|
|
</LinearLayout>
|