Bug 905162 - Hide title when showing empty views in MostRecentPage and LastTabsPage (r=liuche)
authorLucas Rocha <lucasr@mozilla.com>
Wed, 14 Aug 2013 23:23:49 +0100
changeset 143533 e04775b29f63e4553b8e551fd631110976cefbaf
parent 143532 5c6ab32efd8810148ffb92edc39603df1247e80f
child 143534 27a6e8a793a3c7e3cb95051c020e7416637bd28b
push id25130
push userlrocha@mozilla.com
push dateWed, 21 Aug 2013 09:41:27 +0000
treeherdermozilla-central@b2486721572e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs905162
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 905162 - Hide title when showing empty views in MostRecentPage and LastTabsPage (r=liuche)
mobile/android/base/home/LastTabsPage.java
mobile/android/base/home/MostRecentPage.java
--- a/mobile/android/base/home/LastTabsPage.java
+++ b/mobile/android/base/home/LastTabsPage.java
@@ -153,19 +153,20 @@ public class LastTabsPage extends HomeFr
         if (c != null && c.getCount() > 0) {
             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.
+        // Cursor is empty, so hide the title and set the
+        // empty view if it hasn't been set already.
         if (mTitle != null) {
-            mTitle.setVisibility(View.VISIBLE);
+            mTitle.setVisibility(View.GONE);
         }
         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) getView().findViewById(R.id.home_empty_view_stub);
             mEmptyView = emptyViewStub.inflate();
 
--- a/mobile/android/base/home/MostRecentPage.java
+++ b/mobile/android/base/home/MostRecentPage.java
@@ -159,20 +159,22 @@ public class MostRecentPage extends Home
     private void updateUiFromCursor(Cursor c) {
         if (c != null && c.getCount() > 0) {
             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.
+        // Cursor is empty, so hide the title and set the
+        // empty view if it hasn't been set already.
         if (mTitle != null) {
-            mTitle.setVisibility(View.VISIBLE);
+            mTitle.setVisibility(View.GONE);
         }
+
         if (mEmptyView == null) {
             // Set empty page view. We delay this so that the empty view won't flash.
             ViewStub emptyViewStub = (ViewStub) getView().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);