959f4c0fac89425a8a9842e82fc180ec736fffac |
|
11-Mar-2016 |
Yigit Boyar <yboyar@google.com> |
Make RecyclerView tests faster and less flaky This CL makes a bunch improvements in RecyclerView tests. * Change requestFocus helper to wait for smooth scroller (flakiness) * Disable activity launch animation (perf) * Make sure SavedState tests uses same items on restore (flakiness) * Better step calculation in TouchUtils (perf) * Replace scroller to add a listener instead of busy waits (perf & flakiness) * Re-use the same TestActivity between tests. (perf) * This seems very dangerious but given that we have many short running tests, it greatly improves the performance. Change-Id: Id17e5b581c690816e82726bcabfd4899d13b6403
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|
dca8e68e966915b8314095e71538d231a7eee575 |
|
01-Mar-2016 |
Yigit Boyar <yboyar@google.com> |
Avoid NPE in animation scheduling If a changed item disappears in post layout, RV calls animateChange. But if item is never laid out in post layout, it was calling animate disappear. This was inconsistent because even if the View is laid out in post layout, it probably does not have the updated data. This edge case is inheritly conflicting so this CL clarifies & documents the behavior such that: When a changed item disappears: * If item animator decided to re-use the same ViewHolder, RecyclerView will call animate disappearance. * If item animator decided to creates a new ViewHolder for post layout, then RV will call animateChange because it is the only callback with two view holders. * If the layout manager did not layout the view in post layout, RecyclerView will call animateDisappearance. Bug: 27408348 Change-Id: Ie58b1b1a00a89b630b715d680edfa4110b0dd43d
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|
0a017072206f93474ccd2706e7983c2ff778b904 |
|
07-Jan-2016 |
Yigit Boyar <yboyar@google.com> |
Move all RecyclerView tests to Junit4 This CL moves all RecyclerView tests to Junit4 and uses the new ActivityTestRule instead of ActivityInstrumentationTest. Bug: 24494874 Change-Id: I049d8b1ac7869a6af13a3ee7905d6dd1f6eb418b
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|
f1b288ec2104488f4a92e911b0ab80c8f0f3e9d1 |
|
28-Dec-2015 |
Yigit Boyar <yboyar@google.com> |
Add test size annotations to RecyclerView Tests Bug: 24494874 Change-Id: I0e7606d1c55017dc17467155372b708a0b1ea36d
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|
abea494886a17e7a51080ab5e9c2ca041c533353 |
|
09-Dec-2015 |
Yigit Boyar <yboyar@google.com> |
Pass list of payloads to Animator#canReUse This CL adds the payloads as a parameter to the canReUse API. Turns out it was desired so that custom ItemAnimators can select between specific animation or the default behavior of cross-fading. To be consistent with adapter API, the previous method is not deprecated. Bug: 25904129 Change-Id: I97c69aef15268bf0960f8ca7ffff773a4a977192
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|
204cead713431632c2037ac027f4dbfa162d7d03 |
|
20-Oct-2015 |
Yigit Boyar <yboyar@google.com> |
Allow swiped view recycling ASAP This CL fixes a bug in ItemTouchHelper where it would assume that the swiped view will be removed by the RecyclerView even if its animation count does not reach 0. This was a bad assumption and broke w/ the RecyclerView cleanups. This CL changes ItemTouchHelper to allow view's recycling instantly but do the cleanup when the view is detached (e.g. all other animations etc. allows it to be removed). This CL also fixes a bug in ItemAnimatorV2 test where it would call dispatch end twice for change animations. Bug: 25037922 Change-Id: I8c264ef1c7a89cb03f967796a0e14739f9e1945b
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|
e09e0b4ea04b6b6b0ef6c62979e8abdead0bf378 |
|
30-Sep-2015 |
Yigit Boyar <yboyar@google.com> |
Cleanup for item tracking This CL abstracts the Item tracking for RecyclerView. This makes it much easier to test (better encapsulation) + cleaner code. And as an added bonus, I merged some maps to speedup lookups. There is also a small (unreleased) API change for the new ItemAnimation callbacks. It was wrong in the first one but didn't realize because SimpleItemAnimator was taking care of it. I've also added some support annotations & fixed some warnings. Bug: 24665726 Change-Id: Idba09e749f1c0f269d81dbdee4056f6b52ba8484
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|
9051a368c00c40f8679ae67147b9f5af6f93638d |
|
17-Sep-2015 |
Yigit Boyar <yboyar@google.com> |
Reuse hidden views if asked for If a LayoutManager tries to get a view that is in the hidden list, Recycler used to recycle it so that it can be safely rebound as a new item. This approach, although safe, creates UI glitches as item jumps from a location to another instantly. To overcome this issue, now Recycler unhides such views and moves them to scrap. It also reports it to the item animator with necessary flags so that its appearance can properly be evaluated as a persistence (or change). Bug: 24176126 Change-Id: I9858abdd6faf859bdc2ee2a9d2a88228c21fa9b1
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|
121ba9616e5bed44d2490f1744f7b6a9d3e79866 |
|
30-Aug-2015 |
Yigit Boyar <yboyar@google.com> |
RecyclerView Animation API V2 This CL introduces a new Animation for RecyclerView that gives more responsibility and power to the ItemAnimator. It is backward incompatible but there is a new SimpleItemAnimator that mimics the old API for easy transition. The main goal for this API change is to enable better change animations. This change will enable ItemAnimator to easily animate contents of ViewHolders. Bug: 22507896 Change-Id: I4d9a6b92ff5c27691b277a777da77116476b1cd3
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ItemAnimatorV2ApiTest.java
|