Bug 1148197 - Move share overlay margins to child to properly align. r=liuche
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 26 Mar 2015 17:42:47 -0700
changeset 266260 521c3eb713749c37aeb0ec58646751f6893594c7
parent 266259 9ee3773c1ead9b16df3b03e27c556283e2faa8c3
child 266261 817390369f571b684fb6e66a495b42f9a687720a
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs1148197
milestone39.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 1148197 - Move share overlay margins to child to properly align. r=liuche 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"