Bug 1148197 - Move share overlay margins to child to properly align. r=liuche a=sylvestre
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 26 Mar 2015 17:42:47 -0700
changeset 258360 4db575e80883
parent 258359 0db186d2534c
child 258361 358448358c21
push id4650
push usermichael.l.comella@gmail.com
push date2015-04-08 16:32 +0000
treeherdermozilla-beta@4db575e80883 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche, sylvestre
bugs1148197
milestone38.0
Bug 1148197 - Move share overlay margins to child to properly align. r=liuche a=sylvestre When it's on the parent of the outermost container with layout_width="match_parent", the margin adds to the parent's size (i.e. the screen width). Adding the margin to the child ensures the width is reduced and content centered.
mobile/android/base/resources/layout/overlay_share_dialog.xml
--- a/mobile/android/base/resources/layout/overlay_share_dialog.xml
+++ b/mobile/android/base/resources/layout/overlay_share_dialog.xml
@@ -4,25 +4,25 @@
    - 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/. -->
 
 <!-- Serves to position the content on the screen (bottom, centered) and provide the drop-shadow -->
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/sharedialog"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:layout_marginLeft="15dp"
-    android:layout_marginRight="15dp"
     android:clipChildren="false"
     android:clipToPadding="false">
 
     <LinearLayout
         android:layout_width="300dp"
         android:layout_height="wrap_content"
         android:layout_gravity="bottom|center"
+        android:layout_marginLeft="15dp"
+        android:layout_marginRight="15dp"
         android:paddingTop="8dp"
         android:orientation="vertical">
 
         <!-- Title -->
         <TextView
             android:id="@+id/title"
             style="@style/ShareOverlayTitle"
             android:textAppearance="@style/TextAppearance.ShareOverlay.Header"