diff options
-rw-r--r-- | app/src/main/res/drawable/list_item_background.xml | 22 | ||||
-rw-r--r-- | app/src/main/res/drawable/list_item_background_anim.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/layout/app_list_item.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/tunnel_list_item.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values-night/colors.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 4 |
6 files changed, 17 insertions, 23 deletions
diff --git a/app/src/main/res/drawable/list_item_background.xml b/app/src/main/res/drawable/list_item_background.xml index f82df249..f064676a 100644 --- a/app/src/main/res/drawable/list_item_background.xml +++ b/app/src/main/res/drawable/list_item_background.xml @@ -1,10 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- TODO(msf): somehow make an additional activated color entry here (or elsewhere?) that - is in use only in multiselect mode, and one that's in use only in ordinary - select mode. In otherwords, we don't want to use the same background color - for both multiselect and normal select (on two column machines). - --> - <item android:drawable="@color/list_item_activated" android:state_activated="true" /> <!-- TODO(msf): get color from theme with ?android/attr: --> - <item android:drawable="@android:color/transparent" /> <!-- TODO(msf): get color from theme with ?android/attr: --> -</selector> +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <selector> + <item android:state_activated="true"> + <color android:color="?android:attr/colorControlHighlight" /> + <!-- TODO(msf): depending on whether or not we are in multiselect mode, choose instead: + <color android:color="?android:attr/colorControlActivated" /> + --> + </item> + </selector> + </item> + <item android:drawable="?android:attr/selectableItemBackground" /> +</layer-list> diff --git a/app/src/main/res/drawable/list_item_background_anim.xml b/app/src/main/res/drawable/list_item_background_anim.xml deleted file mode 100644 index 8d9ffa42..00000000 --- a/app/src/main/res/drawable/list_item_background_anim.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<ripple xmlns:android="http://schemas.android.com/apk/res/android" - android:color="@color/list_item_ripple"> <!-- TODO(msf): get color from theme with ?android/attr: --> - <item android:drawable="@drawable/list_item_background" /> - <item android:id="@android:id/mask" android:drawable="@android:color/white" /> <!-- TODO(msf): get color from theme with ?android/attr: --> -</ripple> diff --git a/app/src/main/res/layout/app_list_item.xml b/app/src/main/res/layout/app_list_item.xml index d4a41c83..4519a3a4 100644 --- a/app/src/main/res/layout/app_list_item.xml +++ b/app/src/main/res/layout/app_list_item.xml @@ -22,7 +22,7 @@ <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/list_item_background_anim" + android:background="@drawable/list_item_background" android:padding="16dp" android:orientation="horizontal" android:gravity="center_vertical" diff --git a/app/src/main/res/layout/tunnel_list_item.xml b/app/src/main/res/layout/tunnel_list_item.xml index c1ea004a..ba36fe65 100644 --- a/app/src/main/res/layout/tunnel_list_item.xml +++ b/app/src/main/res/layout/tunnel_list_item.xml @@ -28,7 +28,7 @@ <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@drawable/list_item_background_anim" + android:background="@drawable/list_item_background" android:descendantFocusability="blocksDescendants" android:padding="16dp"> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 9a43b163..247d8e33 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- TODO(msf): remove these 4 hard-coded colors and replace with theme colors --> - <color name="list_item_activated">#64cfd8dc</color> - <color name="list_item_ripple">#a0808e95</color> + <!-- TODO(msf): remove these 2 hard-coded colors and replace with theme colors --> <color name="fab_label_text_color">#000000</color> <color name="fab_label_background_color">#bbbbbb</color> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 87454a73..bc0fbdb0 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,8 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- TODO(msf): remove these 4 hard-coded colors and replace with theme colors --> - <color name="list_item_activated">#cfd8dc</color> <!-- Blue Grey 200 --> - <color name="list_item_ripple">#808e95</color> <!-- Blue Grey 200 dark --> + <!-- TODO(msf): remove these 2 hard-coded colors and replace with theme colors --> <color name="fab_label_text_color">#ffffff</color> <color name="fab_label_background_color">#444444</color> |