Bug 894077: Layout for history panel for tablets [r=sriram]
authorShilpan Bhagat <sbhagat@mozilla.com>
Wed, 07 Aug 2013 00:11:31 -0700
changeset 156429 673e9806d6c302d5cda2c784106cb277ac49371a
parent 156428 2b52431a80543125d1b3c278b5575cb7cf9fddc7
child 156430 20ae8ca101790415c8540d62bc2573884b5f4bc3
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram
bugs894077
milestone26.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 894077: Layout for history panel for tablets [r=sriram]
mobile/android/base/Makefile.in
mobile/android/base/TabsPanel.java
mobile/android/base/home/HistoryPage.java
mobile/android/base/home/LastTabsPage.java
mobile/android/base/home/MostRecentPage.java
mobile/android/base/home/MostVisitedPage.java
mobile/android/base/resources/drawable-large-land-v11/home_history_tabs_indicator.xml
mobile/android/base/resources/drawable-xlarge-v11/home_history_tabs_indicator.xml
mobile/android/base/resources/layout-large-land-v11/home_history_list.xml
mobile/android/base/resources/layout-large-land-v11/home_history_page.xml
mobile/android/base/resources/layout-large-land-v11/home_history_tabs_indicator.xml
mobile/android/base/resources/layout-xlarge-v11/home_history_list.xml
mobile/android/base/resources/layout-xlarge-v11/home_history_page.xml
mobile/android/base/resources/layout-xlarge-v11/home_history_tabs_indicator.xml
mobile/android/base/resources/layout/home_history_list.xml
mobile/android/base/resources/layout/home_history_tabs_indicator.xml
mobile/android/base/resources/layout/home_last_tabs_page.xml
mobile/android/base/resources/layout/home_list_with_title.xml
mobile/android/base/resources/layout/home_most_recent_page.xml
mobile/android/base/resources/layout/home_most_visited_page.xml
mobile/android/base/resources/values-large-land-v11/dimens.xml
mobile/android/base/resources/values-large-land-v11/styles.xml
mobile/android/base/resources/values-xlarge-land-v11/dimens.xml
mobile/android/base/resources/values-xlarge-land-v11/styles.xml
mobile/android/base/resources/values-xlarge-v11/dimens.xml
mobile/android/base/resources/values-xlarge-v11/styles.xml
mobile/android/base/resources/values/attrs.xml
mobile/android/base/resources/values/dimens.xml
mobile/android/base/resources/values/styles.xml
mobile/android/base/widget/IconTabWidget.java
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -468,17 +468,17 @@ RES_LAYOUT = \
   res/layout/gecko_app.xml \
   res/layout/home_bookmarks_page.xml \
   res/layout/home_empty_page.xml \
   res/layout/home_item_row.xml \
   res/layout/home_header_row.xml \
   res/layout/home_history_page.xml \
   res/layout/home_history_tabs_indicator.xml \
   res/layout/home_last_tabs_page.xml \
-  res/layout/home_list_with_title.xml \
+  res/layout/home_history_list.xml \
   res/layout/home_most_recent_page.xml \
   res/layout/home_most_visited_page.xml \
   res/layout/home_search_item_row.xml \
   res/layout/home_suggestion_prompt.xml \
   res/layout/web_app.xml \
   res/layout/launch_app_list.xml \
   res/layout/launch_app_listitem.xml \
   res/layout/menu_action_bar.xml \
@@ -518,23 +518,29 @@ RES_LAYOUT = \
   res/layout/videoplayer.xml \
   $(NULL)
 
 RES_LAYOUT_LARGE_V11 = \
   res/layout-large-v11/browser_toolbar.xml \
   $(NULL)
 
 RES_LAYOUT_LARGE_LAND_V11 = \
+  res/layout-large-land-v11/home_history_page.xml \
+  res/layout-large-land-v11/home_history_tabs_indicator.xml \
+  res/layout-large-land-v11/home_history_list.xml \
   res/layout-large-land-v11/tabs_panel.xml \
   res/layout-large-land-v11/tabs_panel_header.xml \
   res/layout-large-land-v11/tabs_panel_footer.xml \
   $(NULL)
 
 RES_LAYOUT_XLARGE_V11 = \
   res/layout-xlarge-v11/font_size_preference.xml \
+  res/layout-xlarge-v11/home_history_page.xml \
+  res/layout-xlarge-v11/home_history_tabs_indicator.xml \
+  res/layout-xlarge-v11/home_history_list.xml \
   res/layout-xlarge-v11/remote_tabs_child.xml \
   res/layout-xlarge-v11/remote_tabs_group.xml \
   $(NULL)
 
 RES_VALUES = \
   $(SYNC_RES_VALUES) \
   res/values/attrs.xml \
   res/values/arrays.xml \
@@ -564,26 +570,28 @@ RES_VALUES_LARGE_V11 = \
   $(SYNC_RES_VALUES_LARGE_V11) \
   res/values-large-v11/dimens.xml \
   res/values-large-v11/layout.xml \
   res/values-large-v11/styles.xml \
   res/values-large-v11/themes.xml \
   $(NULL)
 
 RES_VALUES_LARGE_LAND_V11 = \
+  res/values-large-land-v11/dimens.xml \
   res/values-large-land-v11/styles.xml \
   $(NULL)
 
 RES_VALUES_XLARGE_V11 = \
   res/values-xlarge-v11/dimens.xml \
   res/values-xlarge-v11/integers.xml \
   res/values-xlarge-v11/styles.xml \
   $(NULL)
 
 RES_VALUES_XLARGE_LAND_V11 = \
+  res/values-xlarge-land-v11/dimens.xml \
   res/values-xlarge-land-v11/styles.xml \
   $(NULL)
 
 RES_VALUES_V14 = \
   res/values-v14/styles.xml \
   $(NULL)
 
 RES_VALUES_V16 = \
@@ -988,16 +996,20 @@ RES_DRAWABLE_XHDPI_V11 = \
   res/drawable-xhdpi-v11/ic_menu_save_as_pdf.png \
   res/drawable-xhdpi-v11/ic_menu_settings.png \
   res/drawable-xhdpi-v11/ic_menu_share.png \
   res/drawable-xhdpi-v11/ic_menu_tools.png \
   res/drawable-xhdpi-v11/ic_menu_quit.png \
   res/drawable-xhdpi-v11/ic_status_logo.png \
   $(NULL)
 
+RES_DRAWABLE_LARGE_LAND_V11 = \
+  res/drawable-large-land-v11/home_history_tabs_indicator.xml \
+  $(NULL)
+
 RES_DRAWABLE_LARGE_MDPI_V11 = \
   res/drawable-large-mdpi-v11/arrow_popup_bg.9.png \
   res/drawable-large-mdpi-v11/ic_menu_reload.png \
   res/drawable-large-mdpi-v11/ic_menu_forward.png \
   res/drawable-large-mdpi-v11/menu.png \
   $(NULL)
 
 RES_DRAWABLE_LARGE_HDPI_V11 = \
@@ -1009,16 +1021,20 @@ RES_DRAWABLE_LARGE_HDPI_V11 = \
 
 RES_DRAWABLE_LARGE_XHDPI_V11 = \
   res/drawable-large-xhdpi-v11/arrow_popup_bg.9.png \
   res/drawable-large-xhdpi-v11/ic_menu_reload.png \
   res/drawable-large-xhdpi-v11/ic_menu_forward.png \
   res/drawable-large-xhdpi-v11/menu.png \
   $(NULL)
 
+RES_DRAWABLE_XLARGE_V11 = \
+  res/drawable-xlarge-v11/home_history_tabs_indicator.xml \
+  $(NULL)
+
 RES_DRAWABLE_XLARGE_MDPI_V11 = \
   res/drawable-xlarge-mdpi-v11/ic_menu_bookmark_add.png \
   res/drawable-xlarge-mdpi-v11/ic_menu_bookmark_remove.png \
   $(NULL)
 
 RES_DRAWABLE_XLARGE_HDPI_V11 = \
   res/drawable-xlarge-hdpi-v11/ic_menu_bookmark_add.png \
   res/drawable-xlarge-hdpi-v11/ic_menu_bookmark_remove.png \
@@ -1099,24 +1115,26 @@ RES_DRAWABLE += \
   $(NULL)
 
 RESOURCES = \
   $(RES_ANIM) \
   $(RES_COLOR) \
   $(RES_DRAWABLE) \
   $(RES_DRAWABLE_HDPI) \
   $(RES_DRAWABLE_HDPI_V11) \
+  $(RES_DRAWABLE_LARGE_LAND_V11) \
   $(RES_DRAWABLE_LARGE_HDPI_V11) \
   $(RES_DRAWABLE_LARGE_MDPI_V11) \
   $(RES_DRAWABLE_LARGE_XHDPI_V11) \
   $(RES_DRAWABLE_LDPI) \
   $(RES_DRAWABLE_MDPI) \
   $(RES_DRAWABLE_MDPI_V11) \
   $(RES_DRAWABLE_XHDPI) \
   $(RES_DRAWABLE_XHDPI_V11) \
+  $(RES_DRAWABLE_XLARGE_V11) \
   $(RES_DRAWABLE_XLARGE_HDPI_V11) \
   $(RES_DRAWABLE_XLARGE_MDPI_V11) \
   $(RES_DRAWABLE_XLARGE_XHDPI_V11) \
   $(RES_LAYOUT) \
   $(RES_LAYOUT_LARGE_LAND_V11) \
   $(RES_LAYOUT_LARGE_V11) \
   $(RES_LAYOUT_XLARGE_LAND_V11) \
   $(RES_LAYOUT_XLARGE_V11) \
@@ -1153,19 +1171,21 @@ RES_DIRS= \
   res/drawable-ldpi             \
   res/drawable-mdpi             \
   res/drawable-hdpi             \
   res/drawable-xhdpi            \
   res/drawable                  \
   res/drawable-mdpi-v11         \
   res/drawable-hdpi-v11         \
   res/drawable-xhdpi-v11        \
+  res/drawable-large-land-v11   \
   res/drawable-large-mdpi-v11   \
   res/drawable-large-hdpi-v11   \
   res/drawable-large-xhdpi-v11  \
+  res/drawable-xlarge-v11       \
   res/drawable-xlarge-mdpi-v11  \
   res/drawable-xlarge-hdpi-v11  \
   res/drawable-xlarge-xhdpi-v11 \
   res/color                     \
   res/menu                      \
   res/menu-v11                  \
   res/menu-large-v11            \
   res/menu-xlarge-v11           \
--- a/mobile/android/base/TabsPanel.java
+++ b/mobile/android/base/TabsPanel.java
@@ -100,29 +100,21 @@ public class TabsPanel extends LinearLay
         mAddTab = (ImageButton) findViewById(R.id.add_tab);
         mAddTab.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View v) {
                 TabsPanel.this.addTab();
             }
         });
 
-        ImageButton button;
-        Resources resources = getContext().getResources();
-
         mTabWidget = (IconTabWidget) findViewById(R.id.tab_widget);
 
-        button = mTabWidget.addTab(R.drawable.tabs_normal);
-        button.setContentDescription(resources.getString(R.string.tabs_normal));
-
-        button = mTabWidget.addTab(R.drawable.tabs_private);
-        button.setContentDescription(resources.getString(R.string.tabs_private));
-
-        button = mTabWidget.addTab(R.drawable.tabs_synced);
-        button.setContentDescription(resources.getString(R.string.tabs_synced));
+        mTabWidget.addTab(R.drawable.tabs_normal, R.string.tabs_normal);
+        mTabWidget.addTab(R.drawable.tabs_private, R.string.tabs_private);
+        mTabWidget.addTab(R.drawable.tabs_synced, R.string.tabs_synced);
 
         mTabWidget.setTabSelectionListener(this);
     }
 
     public void addTab() {
         if (mCurrentPanel == Panel.NORMAL_TABS)
            mActivity.addTab();
         else
--- a/mobile/android/base/home/HistoryPage.java
+++ b/mobile/android/base/home/HistoryPage.java
@@ -4,57 +4,55 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.home;
 
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.widget.IconTabWidget;
 import android.support.v4.app.Fragment;
 import android.content.Context;
+import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.LayoutInflater;
 
 import android.widget.ImageButton;
 
 public class HistoryPage extends HomeFragment
                         implements IconTabWidget.OnTabChangedListener {
     // Logging tag name
     private static final String LOGTAG = "GeckoHistoryPage";
     private IconTabWidget mTabWidget;
     private int mSelectedTab;
+    private boolean initializeVisitedPage;
 
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         return inflater.inflate(R.layout.home_history_page, container, false);
     }
 
     @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
 
         mTabWidget = (IconTabWidget) view.findViewById(R.id.tab_icon_widget);
 
-        ImageButton button;
-        final Resources resources = view.getContext().getResources();
-
-        button = mTabWidget.addTab(R.drawable.icon_most_visited);
-        button.setContentDescription(resources.getString(R.string.home_most_visited_title));
+        mTabWidget.addTab(R.drawable.icon_most_visited, R.string.home_most_visited_title);
+        mTabWidget.addTab(R.drawable.icon_most_recent, R.string.home_most_recent_title);
+        mTabWidget.addTab(R.drawable.icon_last_tabs, R.string.home_last_tabs_title);
 
-        button = mTabWidget.addTab(R.drawable.icon_most_recent);
-        button.setContentDescription(resources.getString(R.string.home_most_recent_title));
-
-        button = mTabWidget.addTab(R.drawable.icon_last_tabs);
-        button.setContentDescription(resources.getString(R.string.home_last_tabs_title));
-
-        //Show most visited page as the initial page
-        showMostVisitedPage();
+        // Show most visited page as the initial page.
+        // Since we detach/attach on config change, this prevents from replacing current fragment.
+        if (!initializeVisitedPage) {
+            showMostVisitedPage();
+            initializeVisitedPage = true;
+        }
 
         mTabWidget.setTabSelectionListener(this);
         mTabWidget.setCurrentTab(mSelectedTab);
     }
 
     @Override
     public void load() {}
 
@@ -71,16 +69,29 @@ public class HistoryPage extends HomeFra
         } else if (index == 2) {
             showLastTabsPage();
         }
 
         mTabWidget.setCurrentTab(index);
         mSelectedTab = index;
     }
 
+    @Override
+    public void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+
+        // Rotation should detach and re-attach to use a different layout.
+        if (isVisible()) {
+            getFragmentManager().beginTransaction()
+                                .detach(this)
+                                .attach(this)
+                                .commitAllowingStateLoss();
+        }
+    }
+
     private void showSubPage(Fragment subPage) {
         getChildFragmentManager().beginTransaction()
                 .addToBackStack(null).replace(R.id.visited_page_container, subPage)
                 .commitAllowingStateLoss();
     }
 
     private void showMostVisitedPage() {
         final MostVisitedPage mostVisitedPage = MostVisitedPage.newInstance();
--- a/mobile/android/base/home/LastTabsPage.java
+++ b/mobile/android/base/home/LastTabsPage.java
@@ -92,17 +92,19 @@ public class LastTabsPage extends HomeFr
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         return inflater.inflate(R.layout.home_last_tabs_page, container, false);
     }
 
     @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
         mTitle = (TextView) view.findViewById(R.id.title);
-        mTitle.setText(R.string.home_last_tabs_title);
+        if (mTitle != null) {
+            mTitle.setText(R.string.home_last_tabs_title);
+        }
 
         mList = (ListView) view.findViewById(R.id.list);
 
         mList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 final Cursor c = mAdapter.getCursor();
                 if (c == null || !c.moveToPosition(position)) {
@@ -144,23 +146,27 @@ public class LastTabsPage extends HomeFr
 
         // Create callbacks before the initial loader is started
         mCursorLoaderCallbacks = new CursorLoaderCallbacks();
         loadIfVisible();
     }
 
     private void updateUiFromCursor(Cursor c) {
         if (c != null && c.getCount() > 0) {
-            mTitle.setVisibility(View.VISIBLE);
+            if (mTitle != null) {
+                mTitle.setVisibility(View.VISIBLE);
+            }
             mRestoreButton.setVisibility(View.VISIBLE);
             return;
         }
 
         // Cursor is empty, so hide the title and set the empty view if it hasn't been set already.
-        mTitle.setVisibility(View.GONE);
+        if (mTitle != null) {
+            mTitle.setVisibility(View.VISIBLE);
+        }
         mRestoreButton.setVisibility(View.GONE);
 
         if (mEmptyView == null) {
             // Set empty page view. We delay this so that the empty view won't flash.
             ViewStub emptyViewStub = (ViewStub) getActivity().findViewById(R.id.home_empty_view_stub);
             mEmptyView = emptyViewStub.inflate();
 
             final ImageView emptyIcon = (ImageView) mEmptyView.findViewById(R.id.home_empty_image);
--- a/mobile/android/base/home/MostRecentPage.java
+++ b/mobile/android/base/home/MostRecentPage.java
@@ -88,17 +88,19 @@ public class MostRecentPage extends Home
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         return inflater.inflate(R.layout.home_most_recent_page, container, false);
     }
 
     @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
         mTitle = (TextView) view.findViewById(R.id.title);
-        mTitle.setText(R.string.home_most_recent_title);
+        if (mTitle != null) {
+            mTitle.setText(R.string.home_most_recent_title);
+        }
 
         mList = (ListView) view.findViewById(R.id.list);
         mList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 position -= mAdapter.getMostRecentSectionsCountBefore(position);
                 final Cursor c = mAdapter.getCursor(position);
                 final String url = c.getString(c.getColumnIndexOrThrow(URLColumns.URL));
@@ -149,22 +151,26 @@ public class MostRecentPage extends Home
         public Cursor loadCursor() {
             final ContentResolver cr = getContext().getContentResolver();
             return BrowserDB.getRecentHistory(cr, HISTORY_LIMIT);
         }
     }
 
     private void updateUiFromCursor(Cursor c) {
         if (c != null && c.getCount() > 0) {
-            mTitle.setVisibility(View.VISIBLE);
+            if (mTitle != null) {
+                mTitle.setVisibility(View.VISIBLE);
+            }
             return;
         }
 
         // Cursor is empty, so hide the title and set the empty view if it hasn't been set already.
-        mTitle.setVisibility(View.GONE);
+        if (mTitle != null) {
+            mTitle.setVisibility(View.VISIBLE);
+        }
         if (mEmptyView == null) {
             // Set empty page view. We delay this so that the empty view won't flash.
             ViewStub emptyViewStub = (ViewStub) getActivity().findViewById(R.id.home_empty_view_stub);
             mEmptyView = emptyViewStub.inflate();
 
             final ImageView emptyIcon = (ImageView) mEmptyView.findViewById(R.id.home_empty_image);
             emptyIcon.setImageResource(R.drawable.icon_most_recent_empty);
 
--- a/mobile/android/base/home/MostVisitedPage.java
+++ b/mobile/android/base/home/MostVisitedPage.java
@@ -79,17 +79,20 @@ public class MostVisitedPage extends Hom
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         return inflater.inflate(R.layout.home_most_visited_page, container, false);
     }
 
     @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
         final TextView title = (TextView) view.findViewById(R.id.title);
-        title.setText(R.string.home_most_visited_title);
+        if (title != null) {
+            title.setText(R.string.home_most_visited_title);
+            title.setVisibility(View.VISIBLE);
+        }
 
         mList = (HomeListView) view.findViewById(R.id.list);
 
         mList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 final Cursor c = mAdapter.getCursor();
                 if (c == null || !c.moveToPosition(position)) {
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/drawable-large-land-v11/home_history_tabs_indicator.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_focused="false"
+          android:state_selected="false"
+          android:state_pressed="false"
+          android:drawable="@android:color/transparent"/>
+
+    <item android:state_focused="false"
+          android:state_selected="true"
+          android:state_pressed="false"
+          android:drawable="@color/background_light"/>
+
+    <item android:state_focused="true"
+          android:state_selected="false"
+          android:state_pressed="false"
+          android:drawable="@color/highlight_dark_focused"/>
+
+    <item android:state_focused="true"
+          android:state_selected="true"
+          android:state_pressed="false"
+          android:drawable="@color/background_light"/>
+
+    <item android:state_focused="false"
+          android:state_selected="false"
+          android:state_pressed="true"
+          android:drawable="@color/highlight_dark"/>
+
+    <item android:state_focused="false"
+          android:state_selected="true"
+          android:state_pressed="true"
+          android:drawable="@color/highlight_dark"/>
+
+    <item android:state_focused="true"
+          android:state_selected="false"
+          android:state_pressed="true"
+          android:drawable="@color/highlight_dark"/>
+
+    <item android:state_focused="true"
+          android:state_selected="true"
+          android:state_pressed="true"
+          android:drawable="@color/highlight_dark"/>
+
+</selector>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/drawable-xlarge-v11/home_history_tabs_indicator.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_focused="false"
+          android:state_selected="false"
+          android:state_pressed="false"
+          android:drawable="@android:color/transparent"/>
+
+    <item android:state_focused="false"
+          android:state_selected="true"
+          android:state_pressed="false"
+          android:drawable="@color/background_light"/>
+
+    <item android:state_focused="true"
+          android:state_selected="false"
+          android:state_pressed="false"
+          android:drawable="@color/highlight_dark_focused"/>
+
+    <item android:state_focused="true"
+          android:state_selected="true"
+          android:state_pressed="false"
+          android:drawable="@color/background_light"/>
+
+    <item android:state_focused="false"
+          android:state_selected="false"
+          android:state_pressed="true"
+          android:drawable="@color/highlight_dark"/>
+
+    <item android:state_focused="false"
+          android:state_selected="true"
+          android:state_pressed="true"
+          android:drawable="@color/highlight_dark"/>
+
+    <item android:state_focused="true"
+          android:state_selected="false"
+          android:state_pressed="true"
+          android:drawable="@color/highlight_dark"/>
+
+    <item android:state_focused="true"
+          android:state_selected="true"
+          android:state_pressed="true"
+          android:drawable="@color/highlight_dark"/>
+
+</selector>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout-large-land-v11/home_history_list.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<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"/>
+
+    <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"/>
+
+</merge>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout-large-land-v11/home_history_page.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              xmlns:gecko="http://schemas.android.com/apk/res-auto"
+              android:layout_width="fill_parent"
+              android:layout_height="fill_parent">
+
+    <org.mozilla.gecko.widget.IconTabWidget android:id="@+id/tab_icon_widget"
+                                            style="@style/Widget.Home.HistoryTabWidget"
+                                            android:layout_width="@dimen/history_tab_widget_width"
+                                            android:layout_height="@dimen/history_tab_widget_height"
+                                            android:orientation="vertical"
+                                            android:layout="@layout/home_history_tabs_indicator"
+                                            gecko:display="text"/>
+
+    <FrameLayout android:id="@+id/visited_page_container"
+                 android:layout_width="0dp"
+                 android:layout_height="fill_parent"
+                 android:layout_weight="1" />
+
+</LinearLayout>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout-large-land-v11/home_history_tabs_indicator.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+          style="@style/Widget.Home.HistoryTabIndicator"
+          android:layout_width="fill_parent"
+          android:layout_height="@dimen/history_tab_indicator_height"
+          android:background="@drawable/home_history_tabs_indicator"/>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout-xlarge-v11/home_history_list.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<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"/>
+
+    <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"/>
+
+</merge>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout-xlarge-v11/home_history_page.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              xmlns:gecko="http://schemas.android.com/apk/res-auto"
+              android:layout_width="fill_parent"
+              android:layout_height="fill_parent">
+
+    <org.mozilla.gecko.widget.IconTabWidget android:id="@+id/tab_icon_widget"
+                                            style="@style/Widget.Home.HistoryTabWidget"
+                                            android:layout_width="@dimen/history_tab_widget_width"
+                                            android:layout_height="@dimen/history_tab_widget_height"
+                                            android:orientation="vertical"
+                                            android:layout="@layout/home_history_tabs_indicator"
+                                            gecko:display="text"/>
+
+    <FrameLayout android:id="@+id/visited_page_container"
+                 android:layout_width="0dp"
+                 android:layout_height="fill_parent"
+                 android:layout_weight="1" />
+
+</LinearLayout>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout-xlarge-v11/home_history_tabs_indicator.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+          style="@style/Widget.Home.HistoryTabIndicator"
+          android:layout_width="fill_parent"
+          android:layout_height="@dimen/history_tab_indicator_height"
+          android:background="@drawable/home_history_tabs_indicator"/>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout/home_history_list.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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/. -->
+
+<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"
+              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"/>
+
+</merge>
--- a/mobile/android/base/resources/layout/home_history_tabs_indicator.xml
+++ b/mobile/android/base/resources/layout/home_history_tabs_indicator.xml
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - 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/. -->
 
 <ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
-             android:layout_width="fill_parent"
+             android:layout_width="0dp"
              android:layout_height="fill_parent"
+             android:layout_weight="1"
              android:background="@drawable/home_history_tabs_indicator"/>
--- a/mobile/android/base/resources/layout/home_last_tabs_page.xml
+++ b/mobile/android/base/resources/layout/home_last_tabs_page.xml
@@ -3,17 +3,17 @@
    - 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/. -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               android:orientation="vertical">
 
-    <include layout="@layout/home_list_with_title"/>
+    <include layout="@layout/home_history_list"/>
 
     <LinearLayout android:layout_width="fill_parent"
                   android:layout_height="wrap_content"
                   android:background="@color/home_last_tab_bar_bg">
 
         <Button android:id="@+id/open_all_tabs_button"
                 style="@style/Widget.Home.ActionButton"
                 android:text="@string/home_last_tabs_open"
deleted file mode 100644
--- a/mobile/android/base/resources/layout/home_list_with_title.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - 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/. -->
-
-<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.PageTitle"
-              android:visibility="gone"/>
-
-    <org.mozilla.gecko.home.HomeListView
-            android:id="@+id/list"
-            android:layout_width="fill_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1"/>
-
-</merge>
--- a/mobile/android/base/resources/layout/home_most_recent_page.xml
+++ b/mobile/android/base/resources/layout/home_most_recent_page.xml
@@ -3,11 +3,11 @@
    - 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/. -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               android:orientation="vertical">
 
-    <include layout="@layout/home_list_with_title"/>
+    <include layout="@layout/home_history_list"/>
 
 </LinearLayout>
\ No newline at end of file
--- a/mobile/android/base/resources/layout/home_most_visited_page.xml
+++ b/mobile/android/base/resources/layout/home_most_visited_page.xml
@@ -3,11 +3,11 @@
    - 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/. -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               android:orientation="vertical">
 
-    <include layout="@layout/home_list_with_title"/>
+    <include layout="@layout/home_history_list"/>
 
 </LinearLayout>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/values-large-land-v11/dimens.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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>
+
+    <dimen name="history_tab_widget_width">360dp</dimen>
+
+</resources>
--- a/mobile/android/base/resources/values-large-land-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-land-v11/styles.xml
@@ -30,9 +30,23 @@
         <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>
+        <item name="android:paddingTop">30dp</item>
+        <item name="android:scrollbarStyle">outsideOverlay</item>
+    </style>
+
+    <style name="Widget.Home.HistoryTabWidget">
+        <item name="android:showDividers">beginning|middle|end</item>
+        <item name="android:dividerPadding">0dp</item>
+        <item name="android:paddingLeft">100dp</item>
+        <item name="android:paddingTop">30dp</item>
+    </style>
+
 </resources>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/values-xlarge-land-v11/dimens.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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>
+
+    <dimen name="history_tab_widget_width">480dp</dimen>
+
+</resources>
--- a/mobile/android/base/resources/values-xlarge-land-v11/styles.xml
+++ b/mobile/android/base/resources/values-xlarge-land-v11/styles.xml
@@ -9,9 +9,23 @@
         <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>
+        <item name="android:paddingTop">30dp</item>
+        <item name="android:scrollbarStyle">outsideOverlay</item>
+    </style>
+
+    <style name="Widget.Home.HistoryTabWidget">
+        <item name="android:showDividers">beginning|middle|end</item>
+        <item name="android:dividerPadding">0dp</item>
+        <item name="android:paddingLeft">100dp</item>
+        <item name="android:paddingTop">30dp</item>
+    </style>
+
 </resources>
--- a/mobile/android/base/resources/values-xlarge-v11/dimens.xml
+++ b/mobile/android/base/resources/values-xlarge-v11/dimens.xml
@@ -7,10 +7,11 @@
 
     <dimen name="browser_toolbar_height">56dp</dimen>
     <dimen name="remote_tab_child_row_height">56dp</dimen>
     <dimen name="remote_tab_group_row_height">34dp</dimen>
     <dimen name="tabs_counter_size">26sp</dimen>
     <dimen name="tabs_panel_indicator_width">60dp</dimen>
     <dimen name="tabs_panel_list_padding">8dip</dimen>
     <dimen name="url_bar_offset_left">84dip</dimen>
+    <dimen name="history_tab_widget_width">270dp</dimen>
 
 </resources>
--- a/mobile/android/base/resources/values-xlarge-v11/styles.xml
+++ b/mobile/android/base/resources/values-xlarge-v11/styles.xml
@@ -11,9 +11,22 @@
     -->
 
     <!-- TabWidget --> 
     <style name="TabWidget">
         <item name="android:layout_width">300dip</item>
         <item name="android:layout_height">48dip</item>
     </style>
 
+    <style name="Widget.Home.HistoryListView">
+        <item name="android:paddingLeft">32dp</item>
+        <item name="android:paddingRight">32dp</item>
+        <item name="android:paddingTop">30dp</item>
+        <item name="android:scrollbarStyle">outsideOverlay</item>
+    </style>
+
+    <style name="Widget.Home.HistoryTabWidget">
+        <item name="android:showDividers">beginning|middle|end</item>
+        <item name="android:dividerPadding">0dp</item>
+        <item name="android:paddingTop">30dp</item>
+    </style>
+
 </resources>
--- a/mobile/android/base/resources/values/attrs.xml
+++ b/mobile/android/base/resources/values/attrs.xml
@@ -193,16 +193,22 @@
     </declare-styleable>
 
     <declare-styleable name="GeckoView">
         <attr name="url" format="string"/>
     </declare-styleable>
 
     <declare-styleable name="IconTabWidget">
         <attr name="android:layout"/>
+
+        <!-- Sets the tab's content type. Defaults to icon. -->
+        <attr name="display">
+            <enum name="icon" value="0x00" />
+            <enum name="text" value="0x01" />
+        </attr>
     </declare-styleable>
 
     <declare-styleable name="TopBookmarksView">
         <attr name="android:horizontalSpacing"/>
         <attr name="android:verticalSpacing"/>
     </declare-styleable>
 
 </resources>
--- a/mobile/android/base/resources/values/dimens.xml
+++ b/mobile/android/base/resources/values/dimens.xml
@@ -70,12 +70,19 @@
     <dimen name="text_selection_handle_height">58dp</dimen>
     <dimen name="text_selection_handle_shadow">11dp</dimen>
     <dimen name="top_bookmark_pinsize">20dp</dimen>
     <dimen name="validation_message_height">50dp</dimen>
     <dimen name="validation_message_margin_top">6dp</dimen>
     <dimen name="forward_default_offset">-13dip</dimen>
     <dimen name="url_bar_offset_left">32dp</dimen>
     <dimen name="toast_button_padding">8dp</dimen>
+    <dimen name="history_tab_indicator_height">50dp</dimen>
+
+    <!-- We need to maintain height for the tab widget on History Page
+         since android does not add footer/header divider height to its
+         calculation for wrap_content in LinearLayout.
+         50dp * 3 Views + 30dp padding + 4dp dividers-->
+    <dimen name="history_tab_widget_height">184dp</dimen>
 
     <!-- PageActionButtons dimensions -->
     <dimen name="page_action_button_width">32dp</dimen>
 </resources>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -181,17 +181,17 @@
         <item name="android:paddingLeft">10dip</item>
         <item name="android:paddingRight">10dip</item>
     </style>
 
     <style name="Widget.Home.ActionButton" parent="Widget.Home.PageButton">
         <item name="android:textAppearance">@style/TextAppearance.Widget.Home.PageAction</item>
     </style>
 
-    <style name="Widget.Home.PageTitle">
+    <style name="Widget.Home.HistoryTabIndicator">
         <item name="android:layout_width">fill_parent</item>
         <item name="android:layout_height">32dp</item>
         <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>
--- a/mobile/android/base/widget/IconTabWidget.java
+++ b/mobile/android/base/widget/IconTabWidget.java
@@ -7,46 +7,53 @@ package org.mozilla.gecko.widget;
 import org.mozilla.gecko.R;
 
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.ImageButton;
+import android.widget.TextView;
 import android.widget.TabWidget;
 
 public class IconTabWidget extends TabWidget {
     private OnTabChangedListener mListener;
     private final int mButtonLayoutId;
+    private final boolean mIsIcon;
 
     public static interface OnTabChangedListener {
         public void onTabChanged(int tabIndex);
     }
 
     public IconTabWidget(Context context, AttributeSet attrs) {
         super(context, attrs);
 
         TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.IconTabWidget);
         mButtonLayoutId = a.getResourceId(R.styleable.IconTabWidget_android_layout, 0);
+        mIsIcon = (a.getInt(R.styleable.IconTabWidget_display, 0x00) == 0x00);
         a.recycle();
 
         if (mButtonLayoutId == 0) {
             throw new RuntimeException("You must supply layout attribute");
         }
     }
 
-    public ImageButton addTab(int resId) {
-        ImageButton button = (ImageButton) LayoutInflater.from(getContext()).inflate(mButtonLayoutId, null);
-        button.setImageResource(resId);
+    public void addTab(int imageResId, int stringResId) {
+        View button = LayoutInflater.from(getContext()).inflate(mButtonLayoutId, this, false);
+        if (mIsIcon) {
+            ((ImageButton) button).setImageResource(imageResId);
+            button.setContentDescription(getContext().getString(stringResId));
+        } else {
+            ((TextView) button).setText(getContext().getString(stringResId));
+        }
 
         addView(button);
         button.setOnClickListener(new TabClickListener(getTabCount() - 1));
         button.setOnFocusChangeListener(this);
-        return button;
     }
 
     public void setTabSelectionListener(OnTabChangedListener listener) {
         mListener = listener;
     }
 
     @Override
     public void onFocusChange(View view, boolean hasFocus) {