| Index: chrome/android/java/src/org/chromium/chrome/browser/widget/selection/SelectableListLayout.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/selection/SelectableListLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/selection/SelectableListLayout.java
|
| index ab76880a5e0f8e9665b206a0b6c6b5d1b8c76dc1..1806bdb85426ccf7e7e69989038744e874951b78 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/widget/selection/SelectableListLayout.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/selection/SelectableListLayout.java
|
| @@ -107,6 +107,7 @@ public class SelectableListLayout<E>
|
| private ItemAnimator mItemAnimator;
|
| SelectableListToolbar<E> mToolbar;
|
| private FadingShadowView mToolbarShadow;
|
| + boolean mShowShadowOnSelection;
|
|
|
| private int mEmptyStringResId;
|
| private int mSearchEmptyStringResId;
|
| @@ -224,13 +225,14 @@ public class SelectableListLayout<E>
|
| * when selection is not enabled. If null the default appbar
|
| * background color will be used.
|
| * @param listener The OnMenuItemClickListener to set on the toolbar.
|
| + * @param showShadowOnSelection Whether to show the toolbar shadow on selection.
|
| * @return The initialized SelectionToolbar.
|
| */
|
| public SelectableListToolbar<E> initializeToolbar(int toolbarLayoutId,
|
| SelectionDelegate<E> delegate, int titleResId, @Nullable DrawerLayout drawerLayout,
|
| int normalGroupResId, int selectedGroupResId,
|
| @Nullable Integer normalBackgroundColorResId,
|
| - @Nullable OnMenuItemClickListener listener) {
|
| + @Nullable OnMenuItemClickListener listener, boolean showShadowOnSelection) {
|
| mToolbarStub.setLayoutResource(toolbarLayoutId);
|
| @SuppressWarnings("unchecked")
|
| SelectableListToolbar<E> toolbar = (SelectableListToolbar<E>) mToolbarStub.inflate();
|
| @@ -246,6 +248,7 @@ public class SelectableListLayout<E>
|
| mToolbarShadow.init(
|
| ApiCompatibilityUtils.getColor(getResources(), R.color.toolbar_shadow_color),
|
| FadingShadow.POSITION_TOP);
|
| + mShowShadowOnSelection = showShadowOnSelection;
|
| delegate.addObserver(this);
|
| setToolbarShadowVisibility();
|
|
|
| @@ -385,7 +388,7 @@ public class SelectableListLayout<E>
|
| if (mToolbar == null || mRecyclerView == null) return;
|
|
|
| boolean showShadow = mRecyclerView.canScrollVertically(-1) || mToolbar.isSearching()
|
| - || mToolbar.getSelectionDelegate().isSelectionEnabled();
|
| + || (mToolbar.getSelectionDelegate().isSelectionEnabled() && mShowShadowOnSelection);
|
| mToolbarShadow.setVisibility(showShadow ? View.VISIBLE : View.GONE);
|
| }
|
|
|
|
|