From 52363336f204a1f53c3b547ef931c11cb6e06428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=97=D0=B0=D1=86=D0=B5=D0=BF=D0=B8=D0=BD?= Date: Mon, 20 Apr 2020 18:15:27 +0300 Subject: [PATCH] [android] Removed obsolete drawableLeft attribute usage and replaced it on drawableStart completely and fixed tint method correspondingly --- android/res/layout/about.xml | 5 ----- android/res/layout/activity_download_resources.xml | 1 - android/res/layout/ads_removal_explanation_items.xml | 3 --- android/res/layout/fragment_auth_passport_dialog.xml | 2 -- android/res/layout/fragment_google_play_dialog.xml | 4 ++-- android/res/layout/item_search_clear_history.xml | 2 +- android/res/layout/item_search_my_position.xml | 2 +- android/res/layout/item_search_recent.xml | 2 +- android/res/layout/item_search_suggest.xml | 2 +- android/src/com/mapswithme/util/Graphics.java | 4 ++-- 10 files changed, 8 insertions(+), 19 deletions(-) diff --git a/android/res/layout/about.xml b/android/res/layout/about.xml index 78a8be42b5..541e315538 100644 --- a/android/res/layout/about.xml +++ b/android/res/layout/about.xml @@ -45,19 +45,16 @@ - \ No newline at end of file + diff --git a/android/res/layout/item_search_clear_history.xml b/android/res/layout/item_search_clear_history.xml index 06f2282c92..3015839ae3 100644 --- a/android/res/layout/item_search_clear_history.xml +++ b/android/res/layout/item_search_clear_history.xml @@ -2,4 +2,4 @@ + android:drawableStart="@drawable/ic_cancel"/> diff --git a/android/res/layout/item_search_my_position.xml b/android/res/layout/item_search_my_position.xml index 38f47f40e0..ea1f02f94f 100644 --- a/android/res/layout/item_search_my_position.xml +++ b/android/res/layout/item_search_my_position.xml @@ -2,4 +2,4 @@ + android:drawableStart="@drawable/ic_search_my_position"/> diff --git a/android/res/layout/item_search_recent.xml b/android/res/layout/item_search_recent.xml index f486ac570d..d21db4a622 100644 --- a/android/res/layout/item_search_recent.xml +++ b/android/res/layout/item_search_recent.xml @@ -2,5 +2,5 @@ diff --git a/android/res/layout/item_search_suggest.xml b/android/res/layout/item_search_suggest.xml index 0b59a24ce6..24022e4712 100644 --- a/android/res/layout/item_search_suggest.xml +++ b/android/res/layout/item_search_suggest.xml @@ -3,5 +3,5 @@ xmlns:tools="http://schemas.android.com/tools" style="@style/MwmWidget.TextView.Search" android:textColor="?colorAccent" - android:drawableLeft="@drawable/ic_search_suggest" + android:drawableStart="@drawable/ic_search_suggest" tools:text="Some suggest title"/> diff --git a/android/src/com/mapswithme/util/Graphics.java b/android/src/com/mapswithme/util/Graphics.java index b0ababa8b4..68bd10d3a3 100644 --- a/android/src/com/mapswithme/util/Graphics.java +++ b/android/src/com/mapswithme/util/Graphics.java @@ -72,7 +72,7 @@ public final class Graphics public static void tint(TextView view, @AttrRes int tintAttr) { - final Drawable[] dlist = view.getCompoundDrawables(); + final Drawable[] dlist = view.getCompoundDrawablesRelative(); for (int i = 0; i < dlist.length; i++) dlist[i] = tint(view.getContext(), dlist[i], tintAttr); @@ -81,7 +81,7 @@ public final class Graphics public static void tint(TextView view, ColorStateList tintColors) { - final Drawable[] dlist = view.getCompoundDrawables(); + final Drawable[] dlist = view.getCompoundDrawablesRelative(); for (int i = 0; i < dlist.length; i++) dlist[i] = tint(dlist[i], tintColors);