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

Issue 2065493007: [Android] Use NTPRecyclerView for peeking card viewport height (Closed)

Created:
4 years, 6 months ago by Philipp Keck
Modified:
4 years, 6 months ago
Reviewers:
Bernhard Bauer, PEConn, dgn
CC:
chromium-reviews, zine-eng+reviews_google.com
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Use NTPRecyclerView for peeking card viewport height Instead of using the height of NewTabPageView, use the height of NewTabPageRecyclerView as the viewport height for the computation of the peeking card layout animation. The view structure is: NTPView -> NTPRecyclerView -> Card. The NTPView has the dimensions of the entire screen (excluding Android's status bars). The NTPRecyclerView has the dimensions of the page content. On phones the two coincide, whereas on tablets the tabs and address bar take additional space from the NTPView, which is not included in the NTPRecyclerView. To be visible at the lower edge of the screen, the peeking card (viewholder) needs the distance of the lower edge from the top of the parent it is rendered in. The parent is NTPRecyclerView (not NTPView) and the distance is the height of the parent (aka the height of the viewport). BUG=617577 Committed: https://crrev.com/e6d15de0bd5f2527dec694f4a72a15182ba289f4 Cr-Commit-Position: refs/heads/master@{#400997}

Patch Set 1 #

Patch Set 2 : [Android] Refactor and Use NTPRecyclerView for peeking card viewport height #

Total comments: 15

Patch Set 3 : Comment and code structure improvements #

Total comments: 2

Patch Set 4 : Inline if-return statements #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -52 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java View 1 2 3 4 chunks +5 lines, -7 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardsLayoutOperations.java View 1 2 chunks +0 lines, -43 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java View 1 2 3 2 chunks +54 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (7 generated)
Philipp Keck
4 years, 6 months ago (2016-06-15 12:33:22 UTC) #2
Bernhard Bauer
The CL subject should be in the imperative mood (see http://chris.beams.io/posts/git-commit/). Also, could you explain ...
4 years, 6 months ago (2016-06-15 13:06:14 UTC) #4
Philipp Keck
Ok, thank you. I hope it is better now. While the current code works (I ...
4 years, 6 months ago (2016-06-15 14:26:12 UTC) #6
Bernhard Bauer
On 2016/06/15 14:26:12, pke wrote: > Ok, thank you. I hope it is better now. ...
4 years, 6 months ago (2016-06-15 15:51:40 UTC) #8
Philipp Keck
On 2016/06/15 15:51:40, Bernhard Bauer wrote: > On 2016/06/15 14:26:12, pke wrote: > > Ok, ...
4 years, 6 months ago (2016-06-15 16:05:57 UTC) #9
PEConn
CardLayoutOperations is just a temporary place for us to store all the layout operations until ...
4 years, 6 months ago (2016-06-15 16:09:27 UTC) #10
Bernhard Bauer
On 2016/06/15 16:05:57, pke wrote: > On 2016/06/15 15:51:40, Bernhard Bauer wrote: > > On ...
4 years, 6 months ago (2016-06-15 16:15:13 UTC) #11
Philipp Keck
I moved all the code to the recycler view. Is it good like that? The ...
4 years, 6 months ago (2016-06-16 12:31:50 UTC) #12
Bernhard Bauer
Thanks! https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java (right): https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java#newcode97 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java:97: * value of this card) equivalent to no ...
4 years, 6 months ago (2016-06-16 12:40:12 UTC) #13
Philipp Keck
https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java (right): https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java#newcode97 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java:97: * value of this card) equivalent to no peeking, ...
4 years, 6 months ago (2016-06-16 13:06:02 UTC) #14
Bernhard Bauer
https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java (right): https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java#newcode97 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java:97: * value of this card) equivalent to no peeking, ...
4 years, 6 months ago (2016-06-16 13:54:35 UTC) #15
Philipp Keck
https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java (right): https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java#newcode97 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/CardViewHolder.java:97: * value of this card) equivalent to no peeking, ...
4 years, 6 months ago (2016-06-16 15:28:28 UTC) #16
Bernhard Bauer
https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java (right): https://codereview.chromium.org/2065493007/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java#newcode220 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java:220: // Update the space at the bottom, which needs ...
4 years, 6 months ago (2016-06-16 16:39:28 UTC) #17
Philipp Keck
Ok I changed that - only for return statements. Btw the android-formatter.xml for Eclipse does ...
4 years, 6 months ago (2016-06-17 08:13:28 UTC) #18
Bernhard Bauer
LGTM, thanks!
4 years, 6 months ago (2016-06-17 11:23:20 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2065493007/60001
4 years, 6 months ago (2016-06-21 14:59:16 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-21 15:37:45 UTC) #23
commit-bot: I haz the power
4 years, 6 months ago (2016-06-21 15:42:18 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e6d15de0bd5f2527dec694f4a72a15182ba289f4
Cr-Commit-Position: refs/heads/master@{#400997}

Powered by Google App Engine
This is Rietveld 408576698