Bug 1021356 - Empty private tabs panel visual refinements.
authorMichael Comella <michael.l.comella@gmail.com>
Mon, 14 Jul 2014 14:59:49 -0700
changeset 216003 0bc4b2de1f951502d0087f28f82e9eed886d6e08
parent 216002 a9dd41dffb2b55a4e0ccbd52a11d301c64587bef
child 216004 88bc05432845cacabdfd4550c2b0f620cfe1fd3c
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1021356
milestone33.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 1021356 - Empty private tabs panel visual refinements.
mobile/android/base/resources/layout/private_tabs_panel.xml
mobile/android/base/resources/values-land/styles.xml
mobile/android/base/resources/values-large-land-v11/styles.xml
mobile/android/base/resources/values/styles.xml
mobile/android/base/tabspanel/PrivateTabsPanel.java
--- a/mobile/android/base/resources/layout/private_tabs_panel.xml
+++ b/mobile/android/base/resources/layout/private_tabs_panel.xml
@@ -1,50 +1,55 @@
 <?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"
        xmlns:gecko="http://schemas.android.com/apk/res-auto">
 
-    <org.mozilla.gecko.tabspanel.TabsTray android:id="@+id/private_tabs_tray"
-                                          style="@style/TabsList"
-                                          android:layout_width="match_parent"
-                                          android:layout_height="match_parent"
-                                          android:choiceMode="singleChoice"
-                                          gecko:tabs="tabs_private"/>
+   <FrameLayout android:layout_width="match_parent"
+                android:layout_height="match_parent">
 
-    <LinearLayout android:id="@+id/private_tabs_empty"
-                  style="@style/TabsPanelFrame.PrivateTabs"
-                  android:layout_width="match_parent"
-                  android:layout_height="match_parent">
+        <org.mozilla.gecko.tabspanel.TabsTray android:id="@+id/private_tabs_tray"
+                                              style="@style/TabsList"
+                                              android:layout_width="match_parent"
+                                              android:layout_height="match_parent"
+                                              android:choiceMode="singleChoice"
+                                              gecko:tabs="tabs_private"/>
+
+        <LinearLayout android:id="@+id/private_tabs_empty"
+                      style="@style/TabsPanelFrame.PrivateTabs"
+                      android:layout_width="match_parent"
+                      android:layout_height="match_parent">
+
+            <LinearLayout style="@style/TabsPanelSection.PrivateTabs.Header"
+                          android:layout_width="match_parent"
+                          android:layout_height="wrap_content">
 
-        <LinearLayout style="@style/TabsPanelSection.PrivateTabs.Header"
-                      android:layout_width="match_parent"
-                      android:layout_height="wrap_content">
+                <TextView style="@style/TabsPanelItem.TextAppearance.Header.PrivateTabs"
+                          android:layout_width="match_parent"
+                          android:layout_height="wrap_content"
+                          android:text="@string/private_browsing_title"/>
+
+                <TextView style="@style/TabsPanelItem.TextAppearance"
+                          android:layout_width="match_parent"
+                          android:layout_height="wrap_content"
+                          android:text="@string/private_tabs_panel_empty_desc"/>
 
-            <TextView style="@style/TabsPanelItem.TextAppearance.Header.PrivateTabs"
-                      android:layout_width="match_parent"
-                      android:layout_height="wrap_content"
-                      android:text="@string/private_browsing_title"/>
+            </LinearLayout>
+
+            <LinearLayout style="@style/TabsPanelSection.PrivateTabs"
+                          android:layout_width="match_parent"
+                          android:layout_height="match_parent">
 
-            <TextView style="@style/TabsPanelItem.TextAppearance"
-                      android:layout_width="match_parent"
-                      android:layout_height="wrap_content"
-                      android:text="@string/private_tabs_panel_empty_desc"/>
+                <TextView android:id="@+id/private_tabs_learn_more"
+                          style="@style/TabsPanelItem.TextAppearance.Linkified.LearnMore"
+                          android:layout_width="match_parent"
+                          android:text="@string/private_tabs_panel_learn_more"/>
+
+            </LinearLayout>
 
         </LinearLayout>
 
-        <LinearLayout style="@style/TabsPanelSection.PrivateTabs"
-                      android:layout_width="match_parent"
-                      android:layout_height="match_parent">
-
-            <TextView android:id="@+id/private_tabs_learn_more"
-                      style="@style/TabsPanelItem.TextAppearance.Linkified.LearnMore"
-                      android:layout_width="match_parent"
-                      android:text="@string/private_tabs_panel_learn_more"/>
-
-        </LinearLayout>
-
-    </LinearLayout>
+    </FrameLayout>
 
 </merge>
--- a/mobile/android/base/resources/values-land/styles.xml
+++ b/mobile/android/base/resources/values-land/styles.xml
@@ -28,17 +28,17 @@
         <item name="android:paddingTop">0dp</item>
     </style>
 
     <style name="TabsPanelSection" parent="TabsPanelSectionBase">
         <item name="android:layout_weight">1</item>
     </style>
 
     <style name="TabsPanelSection.PrivateTabs.Header">
-        <item name="android:paddingTop">18dp</item>
+        <item name="android:paddingTop">10dp</item>
     </style>
 
     <style name="TabsPanelItem">
         <item name="android:layout_marginBottom">20dp</item>
         <item name="android:layout_gravity">left</item>
         <item name="android:gravity">left</item>
     </style>
 
--- a/mobile/android/base/resources/values-large-land-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-land-v11/styles.xml
@@ -83,17 +83,17 @@
 
     <style name="TabsPanelItem.Button" parent="TabsPanelItem.ButtonBase">
         <item name="android:paddingTop">12dp</item>
         <item name="android:paddingBottom">12dp</item>
         <item name="android:paddingLeft">6dp</item>
         <item name="android:paddingRight">6dp</item>
         <item name="android:layout_marginLeft">12dp</item>
         <item name="android:layout_marginRight">12dp</item>
-        <item name="android:textSize">16dp</item>
+        <item name="android:textSize">16sp</item>
     </style>
 
     <style name="TabsPanelItem.TextAppearance.Header.FXAccounts">
         <item name="android:visibility">gone</item>
     </style>
 
     <style name="TabsPanelItem.TextAppearance.Header.PrivateTabs">
         <item name="android:visibility">visible</item>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -469,18 +469,18 @@
     </style>
 
     <style name="TabsPanelFrame.PrivateTabs">
         <!-- We set values on tablet. -->
     </style>
 
     <style name="TabsPanelSectionBase">
         <item name="android:orientation">vertical</item>
-        <item name="android:layout_marginLeft">16dp</item>
-        <item name="android:layout_marginRight">16dp</item>
+        <item name="android:layout_marginLeft">40dp</item>
+        <item name="android:layout_marginRight">40dp</item>
     </style>
 
     <style name="TabsPanelSection" parent="TabsPanelSectionBase">
         <!-- We set values in landscape. -->
     </style>
 
     <style name="TabsPanelSection.PrivateTabs">
         <!-- We set values on tablet. -->
@@ -498,36 +498,36 @@
 
     <style name="TabsPanelItem" parent="TabsPanelItemBase">
         <!-- We set values in landscape. -->
     </style>
 
     <style name="TabsPanelItem.ButtonBase">
         <item name="android:background">@drawable/remote_tabs_setup_button_background</item>
         <item name="android:textColor">#FFFEFF</item>
-        <item name="android:textSize">20sp</item>
+        <item name="android:textSize">16sp</item>
         <item name="android:gravity">center</item>
     </style>
 
     <style name="TabsPanelItem.Button" parent="TabsPanelItem.ButtonBase">
         <item name="android:paddingTop">18dp</item>
         <item name="android:paddingBottom">18dp</item>
         <item name="android:paddingLeft">9dp</item>
         <item name="android:paddingRight">9dp</item>
-        <item name="android:layout_marginLeft">24dp</item>
-        <item name="android:layout_marginRight">24dp</item>
     </style>
 
     <style name="TabsPanelItem.TextAppearance">
         <item name="android:textColor">#C0C9D0</item>
-        <item name="android:textSize">16sp</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:lineSpacingMultiplier">1.35</item>
     </style>
 
     <style name="TabsPanelItem.TextAppearance.Header">
-        <item name="android:textSize">20sp</item>
+        <item name="android:textSize">18sp</item>
+        <item name="android:layout_marginBottom">16dp</item>
     </style>
 
     <style name="TabsPanelItem.TextAppearance.Header.FXAccounts">
         <!-- We change these values on landscape. -->
     </style>
 
     <style name="TabsPanelItem.TextAppearance.Header.PrivateTabs">
         <!-- We change these values on landscape and tablet. -->
--- a/mobile/android/base/tabspanel/PrivateTabsPanel.java
+++ b/mobile/android/base/tabspanel/PrivateTabsPanel.java
@@ -12,24 +12,25 @@ import org.mozilla.gecko.R;
 import org.mozilla.gecko.Tabs;
 import org.mozilla.gecko.tabspanel.TabsPanel.CloseAllPanelView;
 
 import android.content.Context;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.FrameLayout;
+import android.widget.ScrollView;
 
 /**
  * A container that wraps the private tabs {@link android.widget.AdapterView} and empty
  * {@link android.view.View} to manage both of their visibility states by changing the visibility of
  * this container as calling {@link android.widget.AdapterView#setVisibility} does not affect the
  * empty View's visibility.
  */
-class PrivateTabsPanel extends FrameLayout implements CloseAllPanelView {
+class PrivateTabsPanel extends ScrollView implements CloseAllPanelView {
     private TabsPanel tabsPanel;
     private TabsTray tabsTray;
 
     public PrivateTabsPanel(Context context, AttributeSet attrs) {
         super(context, attrs);
 
         LayoutInflater.from(context).inflate(R.layout.private_tabs_panel, this);
         tabsTray = (TabsTray) findViewById(R.id.private_tabs_tray);