Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java

Issue 2703463002: [List UI Unification] Basic list unification for phones (Closed)
Patch Set: [List UI Unification] Basic list unification for phones Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.bookmarks; 5 package org.chromium.chrome.browser.bookmarks;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.app.ActivityManager; 8 import android.app.ActivityManager;
9 import android.content.Context; 9 import android.content.Context;
10 import android.support.v4.widget.DrawerLayout; 10 import android.support.v4.widget.DrawerLayout;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 mDrawerListView = (BookmarkDrawerListView) mMainView.findViewById( 136 mDrawerListView = (BookmarkDrawerListView) mMainView.findViewById(
137 R.id.bookmark_drawer_list); 137 R.id.bookmark_drawer_list);
138 138
139 @SuppressWarnings("unchecked") 139 @SuppressWarnings("unchecked")
140 SelectableListLayout<BookmarkId> selectableList = 140 SelectableListLayout<BookmarkId> selectableList =
141 (SelectableListLayout<BookmarkId>) mMainView.findViewById(R.id.s electable_list); 141 (SelectableListLayout<BookmarkId>) mMainView.findViewById(R.id.s electable_list);
142 mSelectableListLayout = selectableList; 142 mSelectableListLayout = selectableList;
143 mSelectableListLayout.initializeEmptyView( 143 mSelectableListLayout.initializeEmptyView(
144 ApiCompatibilityUtils.getDrawable( 144 ApiCompatibilityUtils.getDrawable(
145 mActivity.getResources(), R.drawable.bookmark_logo_large ), 145 mActivity.getResources(), R.drawable.bookmark_logo_large ),
146 R.string.bookmarks_folder_empty); 146 R.string.bookmarks_folder_empty,
147 0 /* Bookmarks search is not yet controlled by the SelectableLis tLayout. */);
147 148
148 mAdapter = new BookmarkItemsAdapter(activity); 149 mAdapter = new BookmarkItemsAdapter(activity);
149 150
150 mRecyclerView = mSelectableListLayout.initializeRecyclerView(mAdapter); 151 mRecyclerView = mSelectableListLayout.initializeRecyclerView(mAdapter);
151 152
152 mToolbar = (BookmarkActionBar) mSelectableListLayout.initializeToolbar( 153 mToolbar = (BookmarkActionBar) mSelectableListLayout.initializeToolbar(
153 R.layout.bookmark_action_bar, mSelectionDelegate, 0, mDrawer, 154 R.layout.bookmark_action_bar, mSelectionDelegate, 0, mDrawer,
154 R.id.normal_menu_group, R.id.selection_mode_menu_group, null, tr ue, null); 155 R.id.normal_menu_group, R.id.selection_mode_menu_group, null, tr ue, null);
155 156
156 mViewSwitcher = (ViewSwitcher) mMainView.findViewById(R.id.bookmark_view _switcher); 157 mViewSwitcher = (ViewSwitcher) mMainView.findViewById(R.id.bookmark_view _switcher);
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 public int getCurrentState() { 417 public int getCurrentState() {
417 if (mStateStack.isEmpty()) return BookmarkUIState.STATE_LOADING; 418 if (mStateStack.isEmpty()) return BookmarkUIState.STATE_LOADING;
418 return mStateStack.peek().mState; 419 return mStateStack.peek().mState;
419 } 420 }
420 421
421 @Override 422 @Override
422 public LargeIconBridge getLargeIconBridge() { 423 public LargeIconBridge getLargeIconBridge() {
423 return mLargeIconBridge; 424 return mLargeIconBridge;
424 } 425 }
425 } 426 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698