Bug 1385934: Use RTL layout attr in activity_stream_topsites_page. r=liuche draft
authorMichael Comella <michael.l.comella@gmail.com>
Tue, 29 Aug 2017 16:57:29 -0700
changeset 655392 4286bdae7b2f1710e44185fe4684903e6e8566a8
parent 655391 df40010625ba5683417a377d2690b80c96726074
child 728825 61d965848c603ed0995298eab736219554ef4ce8
push id76864
push usermichael.l.comella@gmail.com
push dateTue, 29 Aug 2017 23:57:38 +0000
reviewersliuche
bugs1385934
milestone57.0a1
Bug 1385934: Use RTL layout attr in activity_stream_topsites_page. r=liuche MozReview-Commit-ID: EdQzg01FbmS
mobile/android/app/src/main/res/layout/activity_stream_topsites_page.xml
--- a/mobile/android/app/src/main/res/layout/activity_stream_topsites_page.xml
+++ b/mobile/android/app/src/main/res/layout/activity_stream_topsites_page.xml
@@ -1,9 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<!-- The paddingEnd visible to the user comes from the padding between items. As such, paddingEnd here should be 0dp.
+     We need to specify it explicitly to ensure paddingLeft (for devices that don't support paddingStart) doesn't take
+     effect in addition to paddingStart in RTL layouts. -->
 <org.mozilla.gecko.activitystream.homepanel.topsites.TopSitesPage xmlns:android="http://schemas.android.com/apk/res/android"
                                                                   android:orientation="vertical"
-                                                                  android:layout_width="wrap_content"
+                                                                  android:layout_width="match_parent"
                                                                   android:layout_height="match_parent"
-                                                                  android:paddingLeft="10dp"/>
+                                                                  android:paddingStart="10dp"
+                                                                  android:paddingLeft="10dp"
+                                                                  android:paddingEnd="0dp"
+                                                                  android:paddingRight="0dp"/>