From 08a7a28c22bb5e2998fdd772fb27c337cfa8bf8f Mon Sep 17 00:00:00 2001 From: Antoine POPINEAU Date: Mon, 22 Jun 2020 18:05:25 +0200 Subject: [PATCH] Nicest highlight of selected row. --- app/src/main/res/drawable/ripple.xml | 14 ++++++++++++++ app/src/main/res/layout/row_album.xml | 9 ++++----- app/src/main/res/layout/row_artist.xml | 9 ++++----- app/src/main/res/layout/row_playlist.xml | 9 ++++----- app/src/main/res/layout/row_radio.xml | 9 ++++----- app/src/main/res/layout/row_track.xml | 11 +++++------ app/src/main/res/values-night/colors.xml | 2 ++ app/src/main/res/values/colors.xml | 2 ++ 8 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 app/src/main/res/drawable/ripple.xml diff --git a/app/src/main/res/drawable/ripple.xml b/app/src/main/res/drawable/ripple.xml new file mode 100644 index 0000000..3bb79e8 --- /dev/null +++ b/app/src/main/res/drawable/ripple.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/row_album.xml b/app/src/main/res/layout/row_album.xml index 9443687..a7c6464 100644 --- a/app/src/main/res/layout/row_album.xml +++ b/app/src/main/res/layout/row_album.xml @@ -3,13 +3,12 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground" + android:layout_marginHorizontal="8dp" + android:layout_marginVertical="5dp" + android:background="@drawable/ripple" android:gravity="center_vertical" android:orientation="horizontal" - android:paddingStart="16dp" - android:paddingTop="12dp" - android:paddingEnd="16dp" - android:paddingBottom="12dp" + android:padding="8dp" android:transitionGroup="true" tools:showIn="@layout/fragment_albums"> diff --git a/app/src/main/res/layout/row_artist.xml b/app/src/main/res/layout/row_artist.xml index 3a66147..a0dca50 100644 --- a/app/src/main/res/layout/row_artist.xml +++ b/app/src/main/res/layout/row_artist.xml @@ -3,13 +3,12 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground" + android:layout_marginHorizontal="8dp" + android:layout_marginVertical="5dp" + android:background="@drawable/ripple" + android:padding="8dp" android:gravity="center_vertical" android:orientation="horizontal" - android:paddingStart="16dp" - android:paddingTop="12dp" - android:paddingEnd="16dp" - android:paddingBottom="12dp" android:transitionGroup="true" tools:showIn="@layout/fragment_artists"> diff --git a/app/src/main/res/layout/row_playlist.xml b/app/src/main/res/layout/row_playlist.xml index f73a0fc..a0438f8 100644 --- a/app/src/main/res/layout/row_playlist.xml +++ b/app/src/main/res/layout/row_playlist.xml @@ -4,12 +4,11 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground" + android:layout_marginHorizontal="8dp" + android:layout_marginVertical="5dp" + android:background="@drawable/ripple" android:gravity="center_vertical" - android:paddingStart="16dp" - android:paddingTop="12dp" - android:paddingEnd="16dp" - android:paddingBottom="12dp" + android:padding="8dp" android:transitionGroup="true" tools:showIn="@layout/fragment_playlists"> diff --git a/app/src/main/res/layout/row_radio.xml b/app/src/main/res/layout/row_radio.xml index 370480c..db13880 100644 --- a/app/src/main/res/layout/row_radio.xml +++ b/app/src/main/res/layout/row_radio.xml @@ -3,13 +3,12 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground" + android:layout_marginHorizontal="8dp" + android:layout_marginVertical="5dp" + android:background="@drawable/ripple" android:gravity="center_vertical" android:orientation="horizontal" - android:paddingStart="16dp" - android:paddingTop="12dp" - android:paddingEnd="16dp" - android:paddingBottom="12dp" + android:padding="8dp" android:transitionGroup="true" tools:showIn="@layout/fragment_radios"> diff --git a/app/src/main/res/layout/row_track.xml b/app/src/main/res/layout/row_track.xml index 2e44cfa..6deb6b2 100644 --- a/app/src/main/res/layout/row_track.xml +++ b/app/src/main/res/layout/row_track.xml @@ -3,13 +3,12 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?android:attr/selectableItemBackground" + android:layout_marginHorizontal="8dp" + android:layout_marginVertical="6dp" + android:background="@drawable/ripple" android:gravity="center_vertical" android:orientation="horizontal" - android:paddingStart="16dp" - android:paddingTop="12dp" - android:paddingEnd="16dp" - android:paddingBottom="12dp" + android:padding="8dp" android:transitionGroup="true" tools:showIn="@layout/fragment_tracks"> @@ -42,8 +41,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableStart="@drawable/downloaded" - android:drawableTint="@color/controlColor" android:drawablePadding="8dp" + android:drawableTint="@color/controlColor" android:ellipsize="end" android:lines="1" tools:text="Absolution" /> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 24bf72e..9130017 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -19,4 +19,6 @@ @color/controlColor #aeaeae + + #283f4e \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 4ae8547..424739a 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -21,4 +21,6 @@ @color/colorPrimary #999999 + + #c2def0