Bug 1393274 - bustage: Add gravity=start where textAlignment to appease lint. r=mcomella draft
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 31 Aug 2017 13:07:32 -0700
changeset 656876 4b5c4b03e97c529e8cba61794adf87bdc1721dfe
parent 656875 b011a5ce0247abe3f88ce73bfcf113afc1df52af
child 729274 d64b14c00f25b9518328aaee23eef2a603697024
push id77357
push usermichael.l.comella@gmail.com
push dateThu, 31 Aug 2017 20:08:00 +0000
reviewersmcomella
bugs1393274
milestone57.0a1
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>