forked from organicmaps/organicmaps
[android] Removed obsolete drawableLeft attribute usage and replaced it on drawableStart completely and fixed tint method correspondingly
This commit is contained in:
parent
9e3e5f8040
commit
52363336f2
10 changed files with 8 additions and 19 deletions
|
@ -45,19 +45,16 @@
|
|||
<TextView android:id="@+id/web"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/website"
|
||||
android:drawableLeft="@drawable/ic_website"
|
||||
android:drawableStart="@drawable/ic_website"/>
|
||||
|
||||
<TextView android:id="@+id/facebook"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/facebook"
|
||||
android:drawableLeft="@drawable/ic_facebook"
|
||||
android:drawableStart="@drawable/ic_facebook"/>
|
||||
|
||||
<TextView android:id="@+id/twitter"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/twitter"
|
||||
android:drawableLeft="@drawable/ic_twitter"
|
||||
android:drawableStart="@drawable/ic_twitter"/>
|
||||
|
||||
<View android:layout_width="match_parent"
|
||||
|
@ -69,13 +66,11 @@
|
|||
<TextView android:id="@+id/rate"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/rate_gp"
|
||||
android:drawableLeft="@drawable/ic_rate"
|
||||
android:drawableStart="@drawable/ic_rate"/>
|
||||
|
||||
<TextView android:id="@+id/share"
|
||||
style="@style/MwmWidget.TextView.Item"
|
||||
android:text="@string/tell_friends"
|
||||
android:drawableLeft="@drawable/ic_share"
|
||||
android:drawableStart="@drawable/ic_share"/>
|
||||
|
||||
<View android:layout_width="match_parent"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_base_plus"
|
||||
android:drawableLeft="@mipmap/ic_launcher"
|
||||
android:drawablePadding="@dimen/margin_base"
|
||||
android:drawableStart="@mipmap/ic_launcher"
|
||||
android:padding="@dimen/margin_half"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="?attr/accentDot"
|
||||
android:drawableStart="?attr/accentDot"
|
||||
android:drawablePadding="@dimen/margin_half"
|
||||
android:text="@string/why_support_item1"
|
||||
|
@ -20,7 +19,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half_plus"
|
||||
android:drawableLeft="?attr/accentDot"
|
||||
android:drawableStart="?attr/accentDot"
|
||||
android:drawablePadding="@dimen/margin_half"
|
||||
android:text="@string/why_support_item2"
|
||||
|
@ -29,7 +27,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_half_plus"
|
||||
android:drawableLeft="?attr/accentDot"
|
||||
android:drawableStart="?attr/accentDot"
|
||||
android:drawablePadding="@dimen/margin_half"
|
||||
android:text="@string/why_support_item3"
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
android:background="?ghostButtonBackground"
|
||||
android:textColor="?ghostButtonTextColor"
|
||||
android:drawableStart="@drawable/img_google"
|
||||
android:drawableLeft="@drawable/img_google"
|
||||
android:paddingLeft="@dimen/margin_half_plus"
|
||||
android:paddingStart="@dimen/margin_half_plus"
|
||||
android:paddingRight="@dimen/margin_base_plus"
|
||||
|
@ -108,7 +107,6 @@
|
|||
android:background="?facebookButtonBackground"
|
||||
android:textColor="?accentButtonTextColor"
|
||||
android:drawableStart="@drawable/img_facebook"
|
||||
android:drawableLeft="@drawable/img_facebook"
|
||||
android:paddingLeft="@dimen/margin_half_plus"
|
||||
android:paddingStart="@dimen/margin_half_plus"
|
||||
android:paddingRight="@dimen/margin_base_plus"
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?clickableBackground"
|
||||
android:drawableLeft="@drawable/ic_edit"
|
||||
android:drawableStart="@drawable/ic_edit"
|
||||
android:drawablePadding="@dimen/margin_half"
|
||||
android:layout_marginLeft="@dimen/margin_half"
|
||||
android:fontFamily="@string/robotoRegular"
|
||||
|
@ -66,4 +66,4 @@
|
|||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/MwmWidget.TextView.Search"
|
||||
android:text="@string/clear_search"
|
||||
android:drawableLeft="@drawable/ic_cancel"/>
|
||||
android:drawableStart="@drawable/ic_cancel"/>
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/MwmWidget.TextView.Search"
|
||||
android:text="@string/p2p_your_location"
|
||||
android:drawableLeft="@drawable/ic_search_my_position"/>
|
||||
android:drawableStart="@drawable/ic_search_my_position"/>
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/MwmWidget.TextView.Search"
|
||||
android:drawableLeft="@drawable/ic_search_recent"
|
||||
android:drawableStart="@drawable/ic_search_recent"
|
||||
tools:text="Some recent query"/>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue