Bug 824483: about:home is cut off in landscape mode. [r=wesj]
authorSriram Ramasubramanian <sriram@mozilla.com>
Tue, 12 Feb 2013 15:32:13 -0800
changeset 121702 edea345c7c6b593d72cc7c1819c09d84256a47c6
parent 121701 e650f1bab42bb3aa17ca613ed41b154e4974edfd
child 121703 3f3b3b3f1797fa19bcec959d049aacd85a4fec93
push id24303
push userryanvm@gmail.com
push dateWed, 13 Feb 2013 15:19:25 +0000
treeherdermozilla-central@081cf5b0121e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs824483
milestone21.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 824483: about:home is cut off in landscape mode. [r=wesj]
mobile/android/base/AboutHomeContent.java
--- a/mobile/android/base/AboutHomeContent.java
+++ b/mobile/android/base/AboutHomeContent.java
@@ -785,23 +785,18 @@ public class AboutHomeContent extends Sc
             super(context, attrs);
         }
 
         public int getColumnWidth() {
             return getColumnWidth(getWidth());
         }
 
         public int getColumnWidth(int width) {
-            int s = -1;
-            if (android.os.Build.VERSION.SDK_INT >= 16)
-                s= super.getColumnWidth();
-            else
-                s = (width - getPaddingLeft() - getPaddingRight()) / mNumberOfCols;
-
-            return s;
+            // super.getColumnWidth() doesn't always return the correct value.
+            return (width - getPaddingLeft() - getPaddingRight()) / mNumberOfCols;
         }
 
         @Override
         protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
             int measuredWidth = View.MeasureSpec.getSize(widthMeasureSpec);
             int numRows;
 
             SimpleCursorAdapter adapter = (SimpleCursorAdapter) getAdapter();