Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetItemDecoration.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetItemDecoration.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetItemDecoration.java |
| index a5ea6d1e27eb408d5f8ce2be9b7bd7bd780274ed..b80bb70649e738b23fcda715af141aa235615927 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetItemDecoration.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetItemDecoration.java |
| @@ -4,30 +4,22 @@ |
| package org.chromium.chrome.browser.ntp.snippets; |
| -import android.content.Context; |
| import android.graphics.Rect; |
| import android.support.v7.widget.RecyclerView; |
| import android.view.View; |
| -import org.chromium.chrome.R; |
| - |
| /** |
| * A class that decorates the RecyclerView elements. |
| */ |
| public class SnippetItemDecoration extends RecyclerView.ItemDecoration { |
| - private final int mVerticalSpace; |
| - |
| - public SnippetItemDecoration(Context context) { |
| - this.mVerticalSpace = |
| - context.getResources().getDimensionPixelSize(R.dimen.snippets_vertical_space); |
| - } |
| + private static final int VERTICAL_SPACE = 1; |
|
mcwilliams
2016/05/05 13:09:16
I did not see this change go through and I feel th
Bernhard Bauer
2016/05/05 13:20:47
Can you elaborate?
|
| @Override |
| public void getItemOffsets(Rect outRect, View view, RecyclerView parent, |
| RecyclerView.State state) { |
| outRect.setEmpty(); |
| if (parent.getChildAdapterPosition(view) != parent.getAdapter().getItemCount() - 1) { |
| - outRect.bottom = mVerticalSpace; |
| + outRect.bottom = VERTICAL_SPACE; |
| } |
| } |
| } |