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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetItemDecoration.java

Issue 1943893002: Touch up the New Tab Page Snippets UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698