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/StaggeredGridLayoutManagerSavedStateTest.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/StaggeredGridLayoutManagerSavedStateTest.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/StaggeredGridLayoutManagerSavedStateTest.java
|