Make ripple rounded just like other ui elements

This commit is contained in:
Jarne Demeulemeester 2021-10-11 21:30:19 +02:00
parent 6beb5e8236
commit 742ec71e56
No known key found for this signature in database
GPG key ID: B61B7B150DB6A6D2
11 changed files with 42 additions and 22 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/neutral_100">
android:color="?attr/colorControlHighlight">
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="@color/neutral_700" />

View file

@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorPrimaryVariant">
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<solid android:color="?attr/colorPrimary" />
<corners
android:radius="10dp" />
</shape>
</item>
</ripple>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="?attr/colorPrimary" />
<corners android:radius="10dp" />
</shape>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorControlHighlight">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<corners android:radius="10dp"/>
<solid android:color="#ffffff"/>
</shape>
</item>
</ripple>

View file

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/white">
android:color="?attr/colorControlHighlight">
<item android:id="@android:id/mask">
<shape android:shape="oval">
<solid android:color="@color/white"/>
<solid android:color="@color/white" />
</shape>
</item>
<item>
<shape>
<solid android:color="@android:color/transparent"/>
<solid android:color="@android:color/transparent" />
</shape>
</item>
</ripple>

View file

@ -18,7 +18,9 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:layout_marginBottom="24dp"
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/ripple_background"
android:orientation="vertical">
<com.google.android.material.imageview.ShapeableImageView

View file

@ -15,7 +15,9 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:layout_marginBottom="24dp"
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/ripple_background"
android:orientation="vertical">
<com.google.android.material.imageview.ShapeableImageView

View file

@ -153,6 +153,7 @@
android:layout_height="48dp"
android:background="@drawable/button_setup_background"
android:contentDescription="@string/play_button_description"
android:foreground="@drawable/ripple_background"
android:paddingHorizontal="24dp"
android:paddingVertical="12dp"
android:src="@drawable/ic_play" />

View file

@ -19,7 +19,9 @@
android:layout_height="100dp"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="24dp"
android:foreground="?android:attr/selectableItemBackground">
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/ripple_background">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/episode_image"

View file

@ -24,10 +24,10 @@
android:id="@+id/media_info_scrollview"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
@ -147,6 +147,7 @@
android:layout_height="48dp"
android:background="@drawable/button_setup_background"
android:contentDescription="@string/play_button_description"
android:foreground="@drawable/ripple_background"
android:paddingHorizontal="24dp"
android:paddingVertical="12dp"
android:src="@drawable/ic_play" />
@ -350,7 +351,9 @@
android:layout_width="@dimen/nextup_media_width"
android:layout_height="wrap_content"
android:layout_marginHorizontal="24dp"
android:foreground="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/ripple_background"
android:orientation="vertical">
<com.google.android.material.imageview.ShapeableImageView

View file

@ -14,7 +14,9 @@
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="12dp"
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/ripple_background"
android:orientation="vertical">
<com.google.android.material.imageview.ShapeableImageView

View file

@ -13,6 +13,9 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/ripple_background"
android:orientation="vertical"
android:paddingStart="12dp"
android:paddingEnd="12dp"