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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java

Issue 2301023002: Ntp: adjust footer spacing. (Closed)
Patch Set: Remove minimum bottom spacing. It's just 0. Created 4 years, 3 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/res/values/dimens.xml ('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/cards/NewTabPageRecyclerView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java
index 62dc150b30c5c86d6317ded118f18719b87c1285..dbef867f0550358e57b9c201de18c2168679e939 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java
@@ -41,7 +41,6 @@ public class NewTabPageRecyclerView extends RecyclerView {
private final GestureDetector mGestureDetector;
private final LinearLayoutManager mLayoutManager;
private final int mToolbarHeight;
- private final int mMinBottomSpacing;
private final int mMaxHeaderHeight;
/**
@@ -80,8 +79,6 @@ public class NewTabPageRecyclerView extends RecyclerView {
Resources res = context.getResources();
mToolbarHeight = res.getDimensionPixelSize(R.dimen.toolbar_height_no_shadow)
+ res.getDimensionPixelSize(R.dimen.toolbar_progress_bar_height);
- mMinBottomSpacing =
- res.getDimensionPixelSize(R.dimen.ntp_min_bottom_spacing_recycler_view);
mMaxHeaderHeight = res.getDimensionPixelSize(R.dimen.snippets_article_header_height);
}
@@ -177,12 +174,12 @@ public class NewTabPageRecyclerView extends RecyclerView {
int firstVisiblePos = mLayoutManager.findFirstVisibleItemPosition();
if (firstHeaderPos == RecyclerView.NO_POSITION
|| firstVisiblePos == RecyclerView.NO_POSITION) {
- return mMinBottomSpacing;
+ return 0;
}
// We have enough items to fill the view, since the snap point item is not even visible.
if (firstVisiblePos > firstHeaderPos) {
- return mMinBottomSpacing;
+ return 0;
}
ViewHolder lastContentItem = findLastContentItem();
@@ -211,7 +208,7 @@ public class NewTabPageRecyclerView extends RecyclerView {
bottomSpacing -= contentHeight - mCompensationHeight;
}
- return Math.max(mMinBottomSpacing, bottomSpacing);
+ return Math.max(0, bottomSpacing);
}
public void updatePeekingCardAndHeader() {
« no previous file with comments | « chrome/android/java/res/values/dimens.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698