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

Issue 2776183002: NTP: Prevent conflict of dismiss animations and scroll position handling. (Closed)

Created:
3 years, 9 months ago by Michael van Ouwerkerk
Modified:
3 years, 8 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

NTP: Prevent conflict of dismiss animations and scroll position handling. When an item is removed, the RecyclerView fires onScrolled once with the end value, and animates the remaining items into place via translation, without firing intermediate scroll events. Calling computeVerticalScrollOffset returns the end scroll state, not any intermediate animated values, because it's not the property being animated. We disable all focus change animations while the NewTabPageLayout is moved by the RecyclerView, and then update afterwards. BUG=696972 Review-Url: https://codereview.chromium.org/2776183002 Cr-Commit-Position: refs/heads/master@{#460061} Committed: https://chromium.googlesource.com/chromium/src/+/ce4d88aebc3c49570ad75ceb0877e74c72aa4a4d

Patch Set 1 #

Total comments: 4

Patch Set 2 : No need to post a delayed task for scroll handling. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -4 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java View 1 4 chunks +35 lines, -4 lines 0 comments Download

Messages

Total messages: 19 (12 generated)
Michael van Ouwerkerk
Bernhard, could you take a look please?
3 years, 9 months ago (2017-03-27 16:13:01 UTC) #4
Bernhard Bauer
I'm fine with the change itself, but I still don't understand why the bug is ...
3 years, 9 months ago (2017-03-27 17:36:54 UTC) #7
Michael van Ouwerkerk
https://codereview.chromium.org/2776183002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java (right): https://codereview.chromium.org/2776183002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java#newcode201 chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java:201: // If |mNewTabPageLayout| is animated by the RecyclerView because ...
3 years, 8 months ago (2017-03-28 10:44:15 UTC) #9
Michael van Ouwerkerk
Ah yes, please take another look :-)
3 years, 8 months ago (2017-03-28 10:44:40 UTC) #10
Bernhard Bauer
lgtm
3 years, 8 months ago (2017-03-28 10:57:54 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2776183002/20001
3 years, 8 months ago (2017-03-28 11:05:05 UTC) #16
commit-bot: I haz the power
3 years, 8 months ago (2017-03-28 11:24:01 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/ce4d88aebc3c49570ad75ceb0877...

Powered by Google App Engine
This is Rietveld 408576698