Bug 883300: Add an XML layout for the boomarks page. [r=margaret]
authorSriram Ramasubramanian <sriram@mozilla.com>
Fri, 14 Jun 2013 11:58:30 -0700
changeset 143342 21426026164f1af92898e64c88fb8dc05d42270b
parent 143341 9da587767f315bca064af24045ac2e2ef1b8d89d
child 143343 6cd11ae108b510c079347d326444ea0f984da7a9
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)
reviewersmargaret
bugs883300
milestone24.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 883300: Add an XML layout for the boomarks page. [r=margaret]
mobile/android/base/Makefile.in
mobile/android/base/home/BookmarksPage.java
mobile/android/base/resources/layout/home_bookmarks_page.xml
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -432,16 +432,17 @@ RES_LAYOUT = \
   res/layout/browser_toolbar.xml \
   res/layout/datetime_picker.xml \
   res/layout/doorhangerpopup.xml \
   res/layout/doorhanger.xml \
   res/layout/doorhanger_button.xml \
   res/layout/find_in_page_content.xml \
   res/layout/font_size_preference.xml \
   res/layout/gecko_app.xml \
+  res/layout/home_bookmarks_page.xml \
   res/layout/home_item_row.xml \
   res/layout/home_search_item_row.xml \
   res/layout/web_app.xml \
   res/layout/launch_app_list.xml \
   res/layout/launch_app_listitem.xml \
   res/layout/menu_action_bar.xml \
   res/layout/menu_popup.xml \
   res/layout/notification_icon_text.xml \
--- a/mobile/android/base/home/BookmarksPage.java
+++ b/mobile/android/base/home/BookmarksPage.java
@@ -90,27 +90,25 @@ public class BookmarksPage extends HomeF
                 }
             });
         }
     }
 
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         super.onCreateView(inflater, container, savedInstanceState);
-
-        // All list views are styled to look the same with a global activity theme.
-        // If the style of the list changes, inflate it from an XML.
-        mList = new HomeListView(container.getContext());
-        return mList;
+        return inflater.inflate(R.layout.home_bookmarks_page, null);
     }
 
     @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
 
+        mList = (HomeListView) view.findViewById(R.id.bookmarks_list);
+
         // Folder title view, is always in open state.
         mFolderView = (BookmarkFolderView) LayoutInflater.from(getActivity()).inflate(R.layout.bookmark_folder_row, null);
         mFolderView.open();
 
         // We need to add the header before we set the adapter, hence make it null
         refreshListWithCursor(null);
 
         mList.setOnItemClickListener(this);
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout/home_bookmarks_page.xml
@@ -0,0 +1,9 @@
+<?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/. -->
+
+<org.mozilla.gecko.home.HomeListView xmlns:android="http://schemas.android.com/apk/res/android"
+                                     android:id="@+id/bookmarks_list"
+                                     android:layout_width="fill_parent"
+                                     android:layout_height="fill_parent"/>