Dbrant has uploaded a new change for review. https://gerrit.wikimedia.org/r/284545
Change subject: Fix duplicate Search icon for RTL in API <23 ...................................................................... Fix duplicate Search icon for RTL in API <23 There are two places in our code where we use "drawableStart" to insert a drawable at the start of a TextView. The Android guidelines (as well as the IDE) encourage us to *also* supplement it with "drawableLeft" for compatibility with API <17. However, when switching to RTL under API <23, this seems to be having the effect of rendering *both* the "start" drawable, as well as the "left" drawable... whereas theoretically the "start" drawable should override the "left" drawable. Anyway, it looks like it's perfectly acceptable to remove the "left" drawable, and suppress the IDE check for it. On API 17+ this means that it will use the "start" drawable as expected, and on API <17 it still renders the "start" drawable, but always places it on the left, which is also expected. Bug: T133169 Change-Id: Ia43adf10165543a9630c086c702005f1f07fc964 --- M app/src/main/res/layout/activity_page.xml M app/src/main/res/layout/custom_error_view.xml 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/45/284545/1 diff --git a/app/src/main/res/layout/activity_page.xml b/app/src/main/res/layout/activity_page.xml index a630791..f792374 100644 --- a/app/src/main/res/layout/activity_page.xml +++ b/app/src/main/res/layout/activity_page.xml @@ -91,7 +91,7 @@ android:shadowRadius="2" android:layout_gravity="center_vertical" android:drawableStart="@drawable/ic_search" - android:drawableLeft="@drawable/ic_search" + tools:ignore="RtlCompat" android:drawablePadding="4dp"/> <LinearLayout android:id="@+id/search_bar_enabled" diff --git a/app/src/main/res/layout/custom_error_view.xml b/app/src/main/res/layout/custom_error_view.xml index 0062f04..9d9f9bd 100644 --- a/app/src/main/res/layout/custom_error_view.xml +++ b/app/src/main/res/layout/custom_error_view.xml @@ -20,7 +20,7 @@ android:textIsSelectable="true" tools:text="Sample error description" android:drawableStart="@drawable/ic_error_gray" - android:drawableLeft="@drawable/ic_error_gray" + tools:ignore="RtlCompat" android:drawablePadding="8dp" /> -- To view, visit https://gerrit.wikimedia.org/r/284545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia43adf10165543a9630c086c702005f1f07fc964 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant <dbr...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits