History log of /frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseWrapContentTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/BaseWrapContentTest.java
f3844451301cb14ca885e125cb27f108a834c386 16-Mar-2016 Yigit Boyar <yboyar@google.com> Handle hint in unspecified specs

On M+, the parent can pass a hint size with unspecified specs.
Previously, our LayoutManagers ignored this because it might
be garbage on older platforms.

With this CL, RV ensures that it is 0 on older platforms and
the value parent provided in newer ones. This way, RV can
know when to stop based on the hint but still ask for what
it needs (so that it is not treated as AT_MOST).

Bug: 27608240
Change-Id: I2d452731c7251b0ee1f35b9a0694c78381cdf39f
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseWrapContentTest.java
29f43aa1bb825a46fd7cf161a0cd1d5353aaf821 08-Mar-2016 Yigit Boyar <yboyar@google.com> Special handle match parent children in GridLayoutManager

GridLayoutManager measures children first with their measure spec
then re-measures them to have same height. This was creating
larger than expected if the child is MATCH_PARENT and also has
decor offsets / margins.
This CL fixes it by adding insets to the very first measure step
of the child if it has MATCH_PARENT spec in the scroll direction.

This is not an issue in LinearLayoutManager or
StaggeredGridLayoutManager because they don't have any inter-child
alignment and always take insets into account.

Bug: 27479792
Change-Id: Ib5f897f67fe9dd569cc6fbf477bb2c1141bb4a54
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseWrapContentTest.java
6b6a29eea7f6a212447b3cc7b45a081b609ca4b1 29-Jan-2016 Yigit Boyar <yboyar@google.com> Handle padding in wrap content

This CL fixes a bug in GridLayoutManager and StaggeredGridLM where
they were ignoring padding in non-scroll direction when calculating
the content wrapping. This would eventually cause clipped children.

I've also fixed some code-style errors.

Change-Id: I7dca4a30007596ae52bf367e5f7af9a10e387954
Bug: 26769843
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseWrapContentTest.java
4143554adb9b31b700b6876a251a64419e6111e2 10-Dec-2015 Yigit Boyar <yboyar@google.com> RecyclerView Automatic WRAP_CONTENT support

This CL adds support for wrapping content for RecyclerView while
supporting predictive animations.

It is an opt-in API which is off by default because these changes
will change the callback flow, especially will start calling
LayoutManager#onLayout when RecyclerView#onMeasure is called.

See LayoutManager#setAutoMeasureEnabled for API details.

All built in LayoutManagers support WRAP_CONTENT using this new
mechanishm.

Bug: 22508392

Change-Id: I6e010f8807e9d2fa379dd52493b2d8340b8c65de
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseWrapContentTest.java