fix: add selected-state styling hook for workspace drawer rows
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.14" android:color="?attr/colorPrimary" android:state_selected="true" />
|
||||
<item android:color="?attr/colorSurface" />
|
||||
</selector>
|
||||
5
app/src/main/res/color/workspace_drawer_row_stroke.xml
Normal file
5
app/src/main/res/color/workspace_drawer_row_stroke.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="0.70" android:color="?attr/colorPrimary" android:state_selected="true" />
|
||||
<item android:alpha="0.20" android:color="?attr/colorOnSurface" />
|
||||
</selector>
|
||||
5
app/src/main/res/color/workspace_drawer_row_text.xml
Normal file
5
app/src/main/res/color/workspace_drawer_row_text.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?attr/colorPrimary" android:state_selected="true" />
|
||||
<item android:color="?attr/colorOnSurface" />
|
||||
</selector>
|
||||
@@ -4,17 +4,24 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
app:cardBackgroundColor="@color/workspace_drawer_row_background"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:strokeColor="@color/workspace_drawer_row_stroke"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/workspaceTitleText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:duplicateParentState="true"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:textColor="@color/workspace_drawer_row_text"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
Reference in New Issue
Block a user