diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-06-10 18:33:29 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-06-10 18:33:29 +0300 |
commit | e8b4a7577887da20d0a3716f31d455757bf59b3b (patch) | |
tree | 0ebe2d540c0da42f5c55e43712b2ceec7faae8d0 /app/src | |
parent | 484fdd5cf366010b48a95610ad5cfb86872ddd1f (diff) |
Fix multiselection styling
Diffstat (limited to 'app/src')
4 files changed, 27 insertions, 5 deletions
diff --git a/app/src/main/res/drawable-v21/grid_item_background_selector.xml b/app/src/main/res/drawable-v21/grid_item_background_selector.xml new file mode 100644 index 00000000..37de2a6f --- /dev/null +++ b/app/src/main/res/drawable-v21/grid_item_background_selector.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?><!-- Selector is used for Background Colors in List Items --> +<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/bg_highlighted"> + <!-- :selected --> + <item> + <selector> + <item android:state_selected="true"> + <color android:color="@color/bg_highlighted" /> + </item> + + <item android:state_activated="true"> + <color android:color="@color/bg_highlighted" /> + </item> + + <item> + <color android:color="@android:color/transparent" /> + </item> + </selector> + </item> +</ripple>
\ No newline at end of file diff --git a/app/src/main/res/drawable-v21/list_item_background_selector.xml b/app/src/main/res/drawable-v21/list_item_background_selector.xml index ea3fa361..8c562151 100644 --- a/app/src/main/res/drawable-v21/list_item_background_selector.xml +++ b/app/src/main/res/drawable-v21/list_item_background_selector.xml @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="utf-8"?><!-- Selector is used for Background Colors in List Items --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/bg_highlighted"> <!-- :selected --> - - <item> <selector> <item android:state_selected="true"> diff --git a/app/src/main/res/drawable/grid_item_background_selector.xml b/app/src/main/res/drawable/grid_item_background_selector.xml new file mode 100644 index 00000000..24ab9be7 --- /dev/null +++ b/app/src/main/res/drawable/grid_item_background_selector.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?><!-- Selector is used for Background Colors in List Items --> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- :selected --> + <item android:drawable="@color/bg_highlighted" android:state_selected="true" /> + <item android:drawable="@android:color/transparent" /> +</selector> diff --git a/app/src/main/res/layout/item_notes_list_note_item_grid.xml b/app/src/main/res/layout/item_notes_list_note_item_grid.xml index 0e699c84..4fbd6c3c 100644 --- a/app/src/main/res/layout/item_notes_list_note_item_grid.xml +++ b/app/src/main/res/layout/item_notes_list_note_item_grid.xml @@ -8,12 +8,13 @@ android:focusable="true"> <LinearLayout + android:id="@+id/wrapper" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@drawable/grid_item_background_selector" android:orientation="vertical" android:paddingBottom="@dimen/spacer_1x"> - <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" @@ -57,7 +58,6 @@ android:layout_marginBottom="@dimen/spacer_1x" android:textAppearance="?attr/textAppearanceHeadline5" android:textColor="@color/fg_default" - android:textIsSelectable="true" android:theme="@style/textViewStyle" tools:maxLength="50" tools:text="@tools:sample/lorem/random" /> @@ -102,7 +102,6 @@ android:layout_marginBottom="@dimen/spacer_1x" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/fg_default" - android:textIsSelectable="true" android:theme="@style/textViewStyle" tools:maxLength="200" tools:text="@tools:sample/lorem/random" /> |