OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |