mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
Bug 883300: Add an XML layout for the boomarks page. [r=margaret]
This commit is contained in:
parent
17a91f5525
commit
34326d8944
@ -437,6 +437,7 @@ RES_LAYOUT = \
|
||||
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 \
|
||||
|
@ -95,17 +95,15 @@ public class BookmarksPage extends HomeFragment implements AdapterView.OnItemCli
|
||||
@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();
|
||||
|
@ -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"/>
|
Loading…
Reference in New Issue
Block a user