From 7fad600bc4ebc56e0676602131bcf86dc329e29e Mon Sep 17 00:00:00 2001 From: Rosty Date: Thu, 5 Jan 2017 16:32:38 +0200 Subject: [PATCH] quick action dark mode --- .../res/layout/quick_action_add_dialog_item.xml | 2 +- OsmAnd/res/layout/quick_action_add_favorite.xml | 4 ++-- OsmAnd/res/layout/quick_action_add_gpx.xml | 4 ++-- .../layout/quick_action_create_edit_dialog.xml | 8 +++++--- .../layout/quick_action_deletable_list_item.xml | 4 ++-- OsmAnd/res/layout/quick_action_list.xml | 2 +- OsmAnd/res/layout/quick_action_list_item.xml | 2 ++ OsmAnd/res/values/styles.xml | 14 +++++++++++++- .../plus/quickaction/AddQuickActionDialog.java | 9 ++++++++- .../quickaction/CreateEditActionDialog.java | 17 ++++++++++++++--- .../osmand/plus/quickaction/QuickAction.java | 10 ++-------- .../plus/quickaction/QuickActionFactory.java | 9 +++------ 12 files changed, 55 insertions(+), 30 deletions(-) diff --git a/OsmAnd/res/layout/quick_action_add_dialog_item.xml b/OsmAnd/res/layout/quick_action_add_dialog_item.xml index 1d54d88130..fd4ccc32ed 100644 --- a/OsmAnd/res/layout/quick_action_add_dialog_item.xml +++ b/OsmAnd/res/layout/quick_action_add_dialog_item.xml @@ -19,7 +19,7 @@ android:layout_gravity="center_vertical" android:layout_marginRight="16dp" android:scaleType="centerInside" - android:tint="@color/icon_color" + android:tint="?attr/primary_icon_color" android:src="@drawable/ic_action_flag_dark" /> @@ -149,7 +149,7 @@ android:layout_marginStart="12dp" android:layout_marginTop="2dp" android:scaleType="centerInside" - android:tint="@color/icon_color" + android:tint="?attr/primary_icon_color" android:src="@drawable/ic_action_folder"/> diff --git a/OsmAnd/res/layout/quick_action_add_gpx.xml b/OsmAnd/res/layout/quick_action_add_gpx.xml index 0176eef0a8..d8b2b4100e 100644 --- a/OsmAnd/res/layout/quick_action_add_gpx.xml +++ b/OsmAnd/res/layout/quick_action_add_gpx.xml @@ -74,7 +74,7 @@ android:layout_marginStart="12dp" android:layout_marginTop="2dp" android:scaleType="centerInside" - android:tint="@color/icon_color" + android:tint="?attr/primary_icon_color" android:src="@drawable/ic_action_fav_dark"/> @@ -149,7 +149,7 @@ android:layout_marginStart="12dp" android:layout_marginTop="2dp" android:scaleType="centerInside" - android:tint="@color/icon_color" + android:tint="?attr/primary_icon_color" android:src="@drawable/ic_action_folder"/> diff --git a/OsmAnd/res/layout/quick_action_create_edit_dialog.xml b/OsmAnd/res/layout/quick_action_create_edit_dialog.xml index 4a64b381dc..c7cbe89b5d 100644 --- a/OsmAnd/res/layout/quick_action_create_edit_dialog.xml +++ b/OsmAnd/res/layout/quick_action_create_edit_dialog.xml @@ -32,12 +32,14 @@ android:contentInsetLeft="72dp" app:contentInsetLeft="72dp" app:contentInsetStart="72dp" - android:background="@color/actionbar_light_color"/> + android:background="?attr/actionModeBackground"/> + android:descendantFocusability="beforeDescendants" + android:focusableInTouchMode="true" + android:background="?attr/actionModeBackground"> @@ -45,7 +45,7 @@ android:layout_gravity="center_vertical" android:background="?android:selectableItemBackground" android:scaleType="centerInside" - android:tint="@color/icon_color_light" + android:tint="?attr/secondary_icon_color" android:src="@drawable/ic_action_remove_dark"/> diff --git a/OsmAnd/res/layout/quick_action_list.xml b/OsmAnd/res/layout/quick_action_list.xml index ac93362e84..b4d1530172 100644 --- a/OsmAnd/res/layout/quick_action_list.xml +++ b/OsmAnd/res/layout/quick_action_list.xml @@ -10,7 +10,7 @@ android:id="@+id/custom_toolbar" android:layout_width="match_parent" android:layout_height="?android:attr/actionBarSize" - android:background="@color/actionbar_light_color"/> + android:background="?attr/actionModeBackground"/> diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index 9093ed067e..ee308b286a 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -442,10 +442,22 @@ @color/xmas_blue - + +