Bug 1393274 - bustage: Add gravity=start where textAlignment to appease lint. r=mcomella
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 31 Aug 2017 13:07:32 -0700
changeset 378114 63b87e31320db96a4af189dfcd468f8134ae1ebd
parent 378113 a1a1f209f8256e0a9742805d9d832e322b7e5b25
child 378115 eff91b4e33156ebcb56b52eb22a87cf034cd8619
push id94412
push userarchaeopteryx@coole-files.de
push dateFri, 01 Sep 2017 08:46:09 +0000
treeherdermozilla-inbound@d56571d7f1be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1393274
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1393274 - bustage: Add gravity=start where textAlignment to appease lint. r=mcomella Lint passes locally. MozReview-Commit-ID: 8f6hBwjzoYJ
mobile/android/app/src/main/res/layout/activity_stream_webpage_item_row.xml
--- a/mobile/android/app/src/main/res/layout/activity_stream_webpage_item_row.xml
+++ b/mobile/android/app/src/main/res/layout/activity_stream_webpage_item_row.xml
@@ -39,31 +39,32 @@
         android:layout_alignParentTop="true"
         android:layout_gravity="right|end|top"
         android:contentDescription="@string/menu"
         android:paddingBottom="16dp"
         android:paddingTop="16dp" />
 
     <!-- In RTL locales, we don't want a large horizontal gap between the domain, page title and source
          text so we set textAlignment=viewStart for all of them so that it's to the left in LTR and
-         right in RTL. -->
+         right in RTL. Note: to appease the RtlCompat lint warning, gravity="start" is also required. -->
     <TextView
         android:id="@+id/page_domain"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_toEndOf="@id/icon_wrapper"
         android:layout_toLeftOf="@id/menu"
         android:layout_toRightOf="@id/icon_wrapper"
         android:layout_toStartOf="@id/menu"
         android:paddingLeft="@dimen/activity_stream_base_margin"
         android:paddingStart="@dimen/activity_stream_base_margin"
         android:paddingRight="0dp"
         android:paddingEnd="0dp"
         android:paddingTop="@dimen/activity_stream_base_margin"
         android:textAlignment="viewStart"
+        android:gravity="start"
         android:textColor="@color/activity_stream_subtitle"
         android:textSize="12sp"
         tools:text="twitter" />
 
     <!-- See id/page_domain for textAlignment comment. -->
     <TextView
         android:id="@+id/page_title"
         android:layout_width="match_parent"
@@ -75,16 +76,17 @@
         android:layout_toStartOf="@id/menu"
         android:ellipsize="end"
         android:maxLines="3"
         android:paddingLeft="@dimen/activity_stream_base_margin"
         android:paddingStart="@dimen/activity_stream_base_margin"
         android:paddingRight="0dp"
         android:paddingEnd="0dp"
         android:textAlignment="viewStart"
+        android:gravity="start"
         android:textColor="#ff000000"
         android:textSize="14sp"
         android:textStyle="bold"
         tools:text="Descriptive title of a page that is veeeeeeery long - maybe even too long?" />
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
@@ -114,14 +116,15 @@
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_marginStart="2dp"
             android:layout_marginLeft="2dp"
             android:layout_marginRight="0dp"
             android:layout_marginEnd="0dp"
             android:layout_weight="1"
             android:textAlignment="viewStart"
+            android:gravity="start"
             android:textColor="@color/activity_stream_subtitle"
             android:textSize="12sp"
             tools:text="Bookmarked" />
 
     </LinearLayout>
 </RelativeLayout>