diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-11-28 10:23:06 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-11-30 12:16:02 +0100 |
commit | 9e7df5bdf2c0e9585f01c16bbb5a377fe64299ca (patch) | |
tree | 2b527899b264bc92927e5086f38586902cf16646 | |
parent | 10cdb834281c0c37e6966173e67150e39917ccd7 (diff) |
tdf#124480 android: Replace hard-coded bg color with themeable one
or drop explicitly setting background color where the
one from the parent widget should be used.
See also
https://developer.android.com/develop/ui/views/theming/darktheme#themes-styles
Change-Id: I21dc4b7c45e2cc5add96d603abe5e781d4e09992
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160067
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | android/source/res/drawable/label_background.xml | 4 | ||||
-rw-r--r-- | android/source/res/layout/activity_document_browser.xml | 10 | ||||
-rw-r--r-- | android/source/res/layout/item_recent_files.xml | 1 | ||||
-rw-r--r-- | android/source/res/values/themes.xml | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/android/source/res/drawable/label_background.xml b/android/source/res/drawable/label_background.xml index 1e097857537a..3e5b7b1cb907 100644 --- a/android/source/res/drawable/label_background.xml +++ b/android/source/res/drawable/label_background.xml @@ -2,8 +2,8 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape android:shape="rectangle"> - <solid android:color="@color/background_normal" /> + <solid android:color="?attr/colorBackgroundFloating" /> <corners android:radius="5dp" /> </shape> </item> -</selector>
\ No newline at end of file +</selector> diff --git a/android/source/res/layout/activity_document_browser.xml b/android/source/res/layout/activity_document_browser.xml index e47426871f72..b8c00cf973d0 100644 --- a/android/source/res/layout/activity_document_browser.xml +++ b/android/source/res/layout/activity_document_browser.xml @@ -119,7 +119,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" - app:backgroundTint="@color/background_normal" + app:backgroundTint="?attr/colorBackgroundFloating" app:fabSize="normal" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent" @@ -151,7 +151,7 @@ android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom" android:layout_marginTop="@dimen/new_doc_fab_tweak_top" android:clickable="true" - app:backgroundTint="@color/background_normal" + app:backgroundTint="?attr/colorBackgroundFloating" app:fabSize="mini" app:srcCompat="@drawable/writer" app:useCompatPadding="true" /> @@ -183,7 +183,7 @@ android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom" android:layout_marginTop="@dimen/new_doc_fab_tweak_top" android:clickable="true" - app:backgroundTint="@color/background_normal" + app:backgroundTint="?attr/colorBackgroundFloating" app:fabSize="mini" app:srcCompat="@drawable/impress" app:useCompatPadding="true" /> @@ -215,7 +215,7 @@ android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom" android:layout_marginTop="@dimen/new_doc_fab_tweak_top" android:clickable="true" - app:backgroundTint="@color/background_normal" + app:backgroundTint="?attr/colorBackgroundFloating" app:fabSize="mini" app:srcCompat="@drawable/calc" app:useCompatPadding="true" /> @@ -247,7 +247,7 @@ android:layout_marginBottom="@dimen/new_doc_fab_tweak_bottom" android:layout_marginTop="@dimen/new_doc_fab_tweak_top" android:clickable="true" - app:backgroundTint="@color/background_normal" + app:backgroundTint="?attr/colorBackgroundFloating" app:fabSize="mini" app:srcCompat="@drawable/draw" app:useCompatPadding="true" /> diff --git a/android/source/res/layout/item_recent_files.xml b/android/source/res/layout/item_recent_files.xml index b374ba56f04f..f13839b44b73 100644 --- a/android/source/res/layout/item_recent_files.xml +++ b/android/source/res/layout/item_recent_files.xml @@ -11,7 +11,6 @@ android:layout_width="match_parent" android:layout_height="48dp" android:orientation="horizontal" - android:background="?android:attr/selectableItemBackground" android:layout_marginStart="@dimen/list_item_margin" android:layout_marginLeft="@dimen/list_item_margin" android:layout_marginEnd="@dimen/list_item_margin" diff --git a/android/source/res/values/themes.xml b/android/source/res/values/themes.xml index 8576f9c221ec..e26bee22eb31 100644 --- a/android/source/res/values/themes.xml +++ b/android/source/res/values/themes.xml @@ -7,7 +7,7 @@ <style name="ListItemText"> <item name="android:gravity">center_vertical</item> - <item name="android:textColor">@android:color/black</item> + <item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textSize">14sp</item> </style> |