Bug 907188: Don't show dividers in Bookmarks page if the list is empty. [r=lucasr]
authorSriram Ramasubramanian <sriram@mozilla.com>
Thu, 22 Aug 2013 13:14:50 -0700
changeset 144350 2671f9fb3fcc39ce90677cc05fa82a121e6e364f
parent 144349 86e2b8b451f3b288af4ff945baecd04b428c9819
child 144351 4a1bb4573d359cb73af57f8a3cbfc5b9edca3965
push id25159
push userryanvm@gmail.com
push dateTue, 27 Aug 2013 00:17:44 +0000
treeherdermozilla-central@4353fc5afb5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr
bugs907188
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 907188: Don't show dividers in Bookmarks page if the list is empty. [r=lucasr]
mobile/android/base/home/BookmarksPage.java
--- a/mobile/android/base/home/BookmarksPage.java
+++ b/mobile/android/base/home/BookmarksPage.java
@@ -113,16 +113,17 @@ public class BookmarksPage extends HomeF
                     + " must implement HomePager.OnUrlOpenListener");
         }
 
         mPinBookmarkListener = new PinBookmarkListener();
 
         mList = (BookmarksListView) view.findViewById(R.id.bookmarks_list);
         mList.setTag(HomePager.LIST_TAG_BOOKMARKS);
         mList.setOnUrlOpenListener(listener);
+        mList.setHeaderDividersEnabled(false);
 
         mTopBookmarks.setOnUrlOpenListener(listener);
         mTopBookmarks.setOnPinBookmarkListener(mPinBookmarkListener);
 
         registerForContextMenu(mList);
         registerForContextMenu(mTopBookmarks);
     }
 
@@ -401,16 +402,17 @@ public class BookmarksPage extends HomeF
 
         @Override
         public void onLoadFinished(Loader<Cursor> loader, Cursor c) {
             final int loaderId = loader.getId();
             switch(loaderId) {
                 case LOADER_ID_BOOKMARKS_LIST: {
                     mListAdapter.swapCursor(c);
                     loadFavicons(c);
+                    mList.setHeaderDividersEnabled(c != null && c.getCount() > 0);
                     break;
                 }
 
                 case LOADER_ID_TOP_BOOKMARKS: {
                     mTopBookmarksAdapter.swapCursor(c);
 
                     // Load the thumbnails.
                     if (c.getCount() > 0 && c.moveToFirst()) {