| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java
|
| index 9ba6879aae3ee2fe32f1e7929551dfeabef7cf79..bc9c9b425d19aa831603db4b77062a3104b9ab72 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java
|
| @@ -220,18 +220,18 @@ public void updateLayoutParams() {
|
| hasCardBelow = isCard(belowViewType) && belowViewType != ItemViewType.PROMO;
|
| }
|
|
|
| + @DrawableRes
|
| + int selectedBackground = selectBackground(hasCardAbove, hasCardBelow);
|
| + if (mBackground == selectedBackground) return;
|
| +
|
| + mBackground = selectedBackground;
|
| + ViewUtils.setNinePatchBackgroundResource(itemView, selectedBackground);
|
| +
|
| // By default the apparent distance between two cards is the sum of the bottom and top
|
| // height of their shadows. We want |mCardGap| instead, so we set the bottom margin to
|
| // the difference.
|
| getParams().bottomMargin =
|
| hasCardBelow ? (mCardGap - (mCardShadow.top + mCardShadow.bottom)) : 0;
|
| -
|
| - @DrawableRes
|
| - int selectedBackground = selectBackground(hasCardAbove, hasCardBelow);
|
| - if (mBackground != selectedBackground) {
|
| - mBackground = selectedBackground;
|
| - ViewUtils.setNinePatchBackgroundResource(itemView, selectedBackground);
|
| - }
|
| }
|
|
|
| /**
|
|
|