Change selection ripple to accent color

Change the selection ripple so that it matches the chosen accent color.
This commit is contained in:
OxygenCobalt 2020-09-03 07:49:26 -06:00
parent 5827ca492c
commit ce687cd515
6 changed files with 14 additions and 3 deletions

View file

@ -23,7 +23,6 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
Log.d(this::class.simpleName, "Activity Created.")

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/colorPrimary">
<!-- TODO: Find better color to override -->
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="?attr/colorPrimary" />
</shape>
</item>
</ripple>

View file

@ -13,7 +13,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/ripple"
android:clickable="true"
android:focusable="true"
android:padding="@dimen/padding_medium">

View file

@ -13,7 +13,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:background="@drawable/ripple"
android:clickable="true"
android:focusable="true"
android:padding="@dimen/padding_medium">

View file

@ -2,6 +2,7 @@
<resources>
<color name="background">#151515</color>
<color name="divider_color">#6d6d6d</color>
<color name="selection_color">#484848</color>
<!--
Base color set derived from Music Player GO.

View file

@ -2,6 +2,7 @@
<resources>
<color name="background">#fafafa</color>
<color name="divider_color">#6d6d6d</color>
<color name="selection_color">#cbcbcb</color>
<!--
Base color set derived from Music Player GO.