Bug 1093192 - Align close button in new tab grid (r=lucasr)
authorMartyn Haigh <martyn.haigh@gmail.com>
Tue, 04 Nov 2014 18:04:08 +0000
changeset 213980 56f4f58c053bdfa7dbd0ae54b94ce2bfa676301a
parent 213979 211787a9b23ade4d5485d8627110b252c3f6a077
child 213981 3b36af7151ec0af6632c5e0df1b8e4e4509070a0
push id27769
push userkwierso@gmail.com
push dateWed, 05 Nov 2014 03:53:35 +0000
treeherdermozilla-central@62990ec7ad78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr
bugs1093192
milestone36.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 1093192 - Align close button in new tab grid (r=lucasr)
mobile/android/base/resources/layout-v11/new_tablet_tabs_item_cell.xml
--- a/mobile/android/base/resources/layout-v11/new_tablet_tabs_item_cell.xml
+++ b/mobile/android/base/resources/layout-v11/new_tablet_tabs_item_cell.xml
@@ -29,21 +29,25 @@
                                                 style="@style/TabLayoutItemTextAppearance"
                                                 android:textSize="14sp"
                                                 android:textColor="@color/new_tablet_tab_item_title"
                                                 android:singleLine="true"
                                                 android:duplicateParentState="true"
                                                 gecko:fadeWidth="15dp"
                                                 android:paddingRight="5dp"/>
 
+
+        <!-- Use of baselineAlignBottom only supported from API 11+ - if this needs to work on lower API versions
+             we'll need to override getBaseLine() and return image height, but we assume this won't happen -->
         <ImageButton android:id="@+id/close"
                      style="@style/TabsItemClose"
                      android:layout_width="wrap_content"
-                     android:layout_height="match_parent"
+                     android:layout_height="wrap_content"
                      android:scaleType="center"
+                     android:baselineAlignBottom="true"
                      android:background="@android:color/transparent"
                      android:contentDescription="@string/close_tab"
                      android:src="@drawable/new_tablet_tab_item_close_button"
                      android:duplicateParentState="true"/>
 
     </LinearLayout>
 
     <RelativeLayout android:layout_width="wrap_content"