Bug 973529 - Fix FxAccount activity layout and gravity on Android tablets. r=rnewman
authorNick Alexander <nalexander@mozilla.com>
Thu, 10 Apr 2014 14:17:06 -0700
changeset 179073 6edb3b4eba0c68077705157f1bf13ea86118417b
parent 179072 67bcfa1fe3c9e9a30318dadfa89fc420de9818eb
child 179074 0c7af628c3dbd3b00332437ea77af98cce13633f
push id26606
push userryanvm@gmail.com
push dateFri, 18 Apr 2014 02:20:00 +0000
treeherdermozilla-central@ec728bfdbb79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs973529
milestone31.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 973529 - Fix FxAccount activity layout and gravity on Android tablets. r=rnewman ======== https://github.com/mozilla-services/android-sync/commit/dfae76b630b24cc531301597d4fa0b36f2788533 Author: Nick Alexander <nalexander@mozilla.com> Bug 973529 - Fix FxAccount activity layout and gravity on Android tablets.
mobile/android/base/resources/values-large-v11/fxaccount_styles.xml
--- a/mobile/android/base/resources/values-large-v11/fxaccount_styles.xml
+++ b/mobile/android/base/resources/values-large-v11/fxaccount_styles.xml
@@ -8,16 +8,25 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
     <style name="FxAccountMiddle">
         <item name="android:orientation">vertical</item>
         <item name="android:layout_width">500dp</item>
         <item name="android:minWidth">500dp</item>
         <item name="android:layout_height">wrap_content</item>
         <item name="android:layout_weight">1</item>
-        <item name="android:layout_gravity">center</item>
+        <!-- layout_gravity controls where the middle container goes
+             in its parent, and gravity controls where the container
+             places its internal content.  Usually, the middle
+             container is a LinearLayout and the container is a
+             ScrollView.  In this case, layout_gravity="center"
+             interacts badly with vertical scrolling.  What is needed
+             is layout_gravity="center_horizontal" and
+             gravity="center". -->
+        <item name="android:gravity">center</item>
+        <item name="android:layout_gravity">center_horizontal</item>
         <item name="android:paddingTop">25dp</item>
         <item name="android:paddingLeft">12dp</item>
         <item name="android:paddingRight">12dp</item>
         <item name="android:paddingBottom">15dp</item>
     </style>
 
-</resources>
\ No newline at end of file
+</resources>