Bug 918377 - Misc layout fixes on new tab layout in about:home (r=sriram, a=lsblakk)
authorLucas Rocha <lucasr@mozilla.com>
Thu, 19 Sep 2013 17:19:43 -0400
changeset 161431 74ae5aed92b3f6ff5d6aa1014fe161c267cb5feb
parent 161430 3671241aeed4203325c8d58666838fe6c336c5f6
child 161432 92f0f575ff07b56ec9391e9d1333b5b2e2f250ca
push id407
push userlsblakk@mozilla.com
push dateTue, 03 Dec 2013 03:32:50 +0000
treeherdermozilla-release@babf8c9ebc52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram, lsblakk
bugs918377
milestone26.0a2
Bug 918377 - Misc layout fixes on new tab layout in about:home (r=sriram, a=lsblakk)
mobile/android/base/home/TopSitesPage.java
mobile/android/base/resources/drawable/home_page_title_background.xml
mobile/android/base/resources/layout/home_history_list.xml
mobile/android/base/resources/values-large-land-v11/styles.xml
mobile/android/base/resources/values-large-v11/styles.xml
mobile/android/base/resources/values-xlarge-land-v11/styles.xml
mobile/android/base/resources/values/styles.xml
--- a/mobile/android/base/home/TopSitesPage.java
+++ b/mobile/android/base/home/TopSitesPage.java
@@ -516,17 +516,17 @@ public class TopSitesPage extends HomeFr
             cursor.moveToPosition(position + mMaxGridEntries);
 
             final TwoLinePageRow row = (TwoLinePageRow) view;
             row.updateFromCursor(cursor);
         }
 
         @Override
         public View newView(Context context, Cursor cursor, ViewGroup parent) {
-            return LayoutInflater.from(context).inflate(R.layout.home_item_row, parent, false);
+            return LayoutInflater.from(context).inflate(R.layout.bookmark_item_row, parent, false);
         }
     }
 
     public class TopSitesGridAdapter extends CursorAdapter {
         // Cache to store the thumbnails.
         private Map<String, Thumbnail> mThumbnails;
 
         public TopSitesGridAdapter(Context context, Cursor cursor) {
--- a/mobile/android/base/resources/drawable/home_page_title_background.xml
+++ b/mobile/android/base/resources/drawable/home_page_title_background.xml
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
     <item android:left="-1dp"
           android:right="-1dp"
           android:top="-1dp">
 
         <shape android:shape="rectangle" >
             <stroke android:width="1px"
-                    android:color="@color/doorhanger_divider_dark" />
+                    android:color="@color/doorhanger_divider_light" />
 
             <solid android:color="#00000000" />
         </shape>
     </item>
 
 </layer-list>
--- a/mobile/android/base/resources/layout/home_history_list.xml
+++ b/mobile/android/base/resources/layout/home_history_list.xml
@@ -6,17 +6,17 @@
 <merge xmlns:android="http://schemas.android.com/apk/res/android">
 
     <ViewStub android:id="@+id/home_empty_view_stub"
               android:layout="@layout/home_empty_page"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"/>
 
     <TextView android:id="@+id/title"
-              style="@style/Widget.Home.HistoryTabIndicator"
+              style="@style/Widget.Home.HistoryPageTitle"
               android:visibility="gone"/>
 
     <org.mozilla.gecko.home.HomeListView
             android:id="@+id/list"
             style="@style/Widget.Home.HistoryListView"
             android:layout_width="fill_parent"
             android:layout_height="0dp"
             android:layout_weight="1"/>
--- a/mobile/android/base/resources/values-large-land-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-land-v11/styles.xml
@@ -16,25 +16,26 @@
     </style>
 
     <style name="Widget.BookmarkItemView" parent="Widget.TwoLinePageRow">
         <item name="android:paddingLeft">50dp</item>
         <item name="android:paddingRight">50dp</item>
     </style>
 
     <style name="Widget.BookmarksListView" parent="Widget.HomeListView">
+        <item name="android:paddingTop">30dp</item>
         <item name="android:paddingLeft">120dp</item>
         <item name="android:paddingRight">120dp</item>
         <item name="android:scrollbarStyle">outsideOverlay</item>
+        <item name="topDivider">true</item>
     </style>
 
     <style name="Widget.TopSitesGridView" parent="Widget.GridView">
         <item name="android:paddingLeft">55dp</item>
         <item name="android:paddingRight">55dp</item>
-        <item name="android:paddingTop">30dp</item>
         <item name="android:paddingBottom">30dp</item>
         <item name="android:horizontalSpacing">20dp</item>
         <item name="android:verticalSpacing">20dp</item>
     </style>
 
     <style name="Widget.Home.HistoryListView">
         <item name="android:paddingLeft">50dp</item>
         <item name="android:paddingRight">100dp</item>
--- a/mobile/android/base/resources/values-large-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-v11/styles.xml
@@ -67,24 +67,36 @@
         <item name="android:paddingRight">32dp</item>
         <item name="android:scrollbarStyle">outsideOverlay</item>
         <item name="topDivider">true</item>
     </style>
 
     <style name="Widget.TopSitesGridView" parent="Widget.GridView">
         <item name="android:paddingLeft">5dp</item>
         <item name="android:paddingRight">5dp</item>
-        <item name="android:paddingTop">30dp</item>
         <item name="android:paddingBottom">30dp</item>
         <item name="android:horizontalSpacing">10dp</item>
         <item name="android:verticalSpacing">10dp</item>
     </style>
 
-    <style name="Widget.TopSitesListView" parent="Widget.BookmarksListView"/>
+    <style name="Widget.TopSitesListView" parent="Widget.BookmarksListView">
+        <item name="topDivider">false</item>
+    </style>
 
     <style name="Widget.ReadingListView" parent="Widget.BookmarksListView"/>
 
+    <style name="Widget.Home.HistoryPageTitle" parent="Widget.Home.HistoryTabIndicator">
+        <item name="android:layout_marginLeft">32dp</item>
+        <item name="android:layout_marginRight">32dp</item>
+    </style>
+
+    <style name="Widget.Home.HistoryListView">
+        <item name="android:paddingLeft">32dp</item>
+        <item name="android:paddingRight">32dp</item>
+        <item name="android:scrollbarStyle">outsideOverlay</item>
+    </style>
+
     <style name="Widget.HomeBanner">
         <item name="android:paddingLeft">32dp</item>
         <item name="android:paddingRight">32dp</item>
     </style>
 
 </resources>
--- a/mobile/android/base/resources/values-xlarge-land-v11/styles.xml
+++ b/mobile/android/base/resources/values-xlarge-land-v11/styles.xml
@@ -3,17 +3,16 @@
    - 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/. -->
 
 <resources>
 
     <style name="Widget.TopSitesGridView" parent="Widget.GridView">
         <item name="android:paddingLeft">55dp</item>
         <item name="android:paddingRight">55dp</item>
-        <item name="android:paddingTop">30dp</item>
         <item name="android:paddingBottom">30dp</item>
         <item name="android:horizontalSpacing">56dp</item>
         <item name="android:verticalSpacing">20dp</item>
     </style>
 
     <style name="Widget.Home.HistoryListView">
         <item name="android:paddingLeft">50dp</item>
         <item name="android:paddingRight">100dp</item>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -198,16 +198,18 @@
         <item name="android:textAppearance">@style/TextAppearance.Widget.Home.PageTitle</item>
         <item name="android:background">@drawable/home_page_title_background</item>
         <item name="android:focusable">false</item>
         <item name="android:gravity">center|left</item>
         <item name="android:paddingLeft">10dip</item>
         <item name="android:paddingRight">10dip</item>
     </style>
 
+    <style name="Widget.Home.HistoryPageTitle" parent="Widget.Home.HistoryTabIndicator"/>
+
     <!--
         TextAppearance
         Note: Gecko uses light theme as default, while Android uses dark.
         If Android convention has to be followd, the list of colors specified 
         in themes.xml would be inverse, and things would get confusing.
         Hence, Gecko's TextAppearance is based on text over light theme and
         TextAppearance.Inverse is based on text over dark theme.
     -->