History log of /frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e37d2e63f16bc5c2938e372238ba54679a9e578e 27-Nov-2014 Yigit Boyar <yboyar@google.com> Enable getAdapterPosition when View is rebound

getAdapterPosition used to return NO_POSITION if data set has changed
after the last layout and the next layout is not complete yet.
This would be a problem if RecyclerView already processed adapter
updates, rebound the view but has not finished the layout calculation.

This CL starts tracking position invalidation per ViewHolder and
removes the flag as soon as it is rebound. This way, when
ItemDecoration callbacks are called, developers can access adapter
position.

This CL also adds a test to ensure that ItemDecoration callback
promise is kept so that we don't break it in the future by mistake.

Bug: 18524432
Change-Id: I3fc7ac9b0d78bd87b1b85ed15c99af89e252c58b
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
115ba0c7b2a14aa4cd0273952195e1d8f6468f87 10-Nov-2014 Yigit Boyar <yboyar@google.com> Deprecate ViewHolder#getPosition

getPosition methods in RecyclerView were ambiguous because of the deferred
handling of adapter updates. To avoid future confusion, this CL deprecates
methods that receive or return "position" and introduces two methods that
receive / return "layoutPosition" or "adapterPosition".

This will help developers get the exact number they need (e.g. the position
in adapter vs the position user is currently seeing)

The following methods have been deprecated:

RecyclerView#getChildPosition
RecyclerView#findViewHolderForPosition
ViewHolder#getPosition
LayoutParams#getViewPosition

Bug: 18213371
Change-Id: I52667bd43e32fc55de8861f5fdc01a0aa7fbe60f
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
d17ce72488bb0b13b34a3684c86e48c230b6a5a4 21-Nov-2014 Yigit Boyar <yboyar@google.com> Merge "Add an API to let Adapter recycle transient views" into lmp-mr1-dev
e2437126f0225135891544315ff72e54c7de0f59 05-Nov-2014 Yigit Boyar <yboyar@google.com> Add an API to let Adapter recycle transient views

Bug: 17783452
Change-Id: I70f2386b6f7d88e78a389a7fc1f583d0f1c45c0e
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
abd0fbfcdd5b438909f126392eca5978b5939b6d 19-Nov-2014 Yigit Boyar <yboyar@google.com> Guard layout managers calls not to crash

Previously, RecyclerView would crash if a call should be handled by Layout Manager
and it is not set yet. Although this makes sense, there are some cases where
developer would like to set LayoutManager after checking some other logic or
RecyclerView is attached/detached w/o being setup. This CL guards a bunch of
public calls to print an error if LayoutManager is not present, instead of crashing.

Bug: 18444564
Change-Id: I666ea346a615ca5338af32b25774bf90bbcb551c
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
90ca3086dbf66ad6bb8840e46ec8524a705e1c18 03-Oct-2014 Yigit Boyar <yboyar@google.com> Fix RV's onViewAttached/detached callbacks

This change also fixes a bug in DefaultItemAnimator.

Bug: 17599182
Bug: 17881182
Change-Id: I4adadeb5d2d7d5aaef0f253eac52d2624de73d5e
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
824a7db96feacf3b68f56993ed72712bc935153e 14-Oct-2014 Yigit Boyar <yboyar@google.com> RecyclerView should call correct adapter on swap

Bug: 17687329
Change-Id: I35bc785e6c64d1fd0844286766e8ddb59d061737
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
ca9ce7ccdccf6b6a2a81da73dd1e6425d90e4b23 30-Sep-2014 Yigit Boyar <yboyar@google.com> Assign View spans before they are measured

Bug: 17706218
Change-Id: I349b9a1918825ff6c45079f7617cf499c90c3cd1
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
bb6ebab3b3b85ec20b3bc262289a2460705322f5 25-Sep-2014 Yigit Boyar <yboyar@google.com> Set scroll state when stop scroll is called

Bug: 17644072

Change-Id: Iac0b0cff4ee06b461cebb6e933a5a712a06a7a4e
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
572bf0c80bb3db98ce0fbb091073dabc4f1f8af0 15-Aug-2014 Yigit Boyar <yboyar@google.com> Merge "Bugfixes for StaggeredGridLayoutManager" into lmp-dev
c50c4cad31d73e574b27bb3d7581542975e37263 15-Aug-2014 Yigit Boyar <yboyar@google.com> Fixed LinearLayoutManger's scrollToPositionWithOffset

Previously, LLM was not handling scroll to position with offset when layout
is reverse or stack from end, this change fixes it, adds tests.

I also improved how predictive animations are handled. If a visible item is
scrolled, now LLM lays out more children in the opposite direction in pre-layout
so that when they become visible, they don't just fade in but animate from the
correct direction.

Bug:17015719
Change-Id: I2748c0636927159201202a7eb4caf338d67d6ca9
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
d7e2f2ab1d253133fa54f309e74a7ee384c33971 08-Aug-2014 Yigit Boyar <yboyar@google.com> Bugfixes for StaggeredGridLayoutManager

Bug: 16678349
Bug: 16403163
Bug: 16734653

Change-Id: If78aa7ec4a09860ccca698bcb851dff5e5db5ae7
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
f485be9def4c0f72cfdfa6b0c616c23f04652817 13-Aug-2014 Yigit Boyar <yboyar@google.com> Ignored views should be ignored by getViewForPosition

Bug: 16950247
Change-Id: I3940ce3b049a3ae718706c503b0404f3fda43ffd
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
310e95e1c6dfe4f26ef594233e65e1ff83e0f1ff 01-Aug-2014 Yigit Boyar <yboyar@google.com> Improve LinearLayoutManager's re-layout handling

This CL fixes a bug in LinearLayoutManager where it was not respecting
stackFromEnd/reverseLayout parameter when RecyclerView is resized.

With this CL, LLM also considers focused child when selecting the anchor
item so that focused child stays at the same position.

I also cleaned up some code and moved complex stuff to separate methods.
This should help make the code more readable.

Change-Id: I8427ee60ee45c337e7e670853d4eeb002592048e
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
6e83751247c5be0211d7bffaf057431c03dfef38 25-Jul-2014 Yigit Boyar <yboyar@google.com> LayoutManagers should not jump to position in pre-layout

Bug: 16550277
Change-Id: I60335e4994309e53311e95c890a4934edead70f0
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
0b1059b711009601ff08354e2df6bfc45266e80a 21-Jul-2014 Yigit Boyar <yboyar@google.com> Add swapAdapter method to RecyclerView

Bug: 16315373
Change-Id: Ia790aff458d2ca61ec403dd9887d9758eb74f47a
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
504c54ea52c1b2aae6f8f4ae128f1dcaac7e3f6a 13-Jul-2014 Yigit Boyar <yboyar@google.com> Support animations during multiple layout calls

This CL also fixes two bugs related to view recycling
* we were moving views to cached view list w/o checking if they are recycleable or not
* AdapterHelper had a bug where it was checking missing views via < -1 instead of == -1

Change-Id: I7d70c1b884c3af046ba78924c9a966f83cda99f0
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
cadd54707a7aaa4cfa9c8b8051c6185e8717f22e 11-Jul-2014 Chet Haase <chet@google.com> Invalidate ItemDecorators more aggressively

This CL also changes the ViewDecorator API to receive View and State instead of position

Bug: 15699227
Change-Id: Ie4deb49eed803540a3bd274454d2e67d2f34a50d
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
8da5bba529a2fe9bd2aafab28010e11ec4de93c7 08-Jul-2014 Yigit Boyar <yboyar@google.com> Reset ViewHolder when it is passed to/from RecyclerPool

* Fixed a code path where cached views may be sent to recycler
even if they are not recyclable. Did some cleanup on how
cached views are handled.

* This CL also fixes a small NPE when we scrap a view holder

Change-Id: I172fbedf0d3ba06b4121fa275d8fa62c583b91b5
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
c8b0ff5869e17a656a3a1d7fb306efa5b99fa07f 07-Jul-2014 Yigit Boyar <yboyar@google.com> Improved how RecyclerView handles stable ids

RecyclerView can re-use views via stable ids but it was going into an
inconsistent state if an item is removed and re-added in the same layout pass.
This CL takes care of that case and handles it as if item has moved.

Bug: 16081401
Change-Id: Ic0bec5061a4958111c8e43a1cd6634cd90d975b5
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
e0c347f627f8a78d3e5e3e5eaac9c3ae26208689 24-Jun-2014 Yigit Boyar <yboyar@google.com> Run simple animations if adapter has stable ids

Previously, if adapter calls notifyDataSetChanged, RecyclerView would
disable all animations since the world may have changed unexpectedly.

With this change, RecyclerView takes advantage of stable ids when views are
returned from scrap/cache so that we can animate these views to their new
locations / positions.

This change also fixes a bug where cached views would not be recycled if
notifyDataSetChanged is called. Now, if adapter does not have stable ids,
cached views are recycled. If adapter has stable ids, they are retrieved
via stable ids.

Bug: 15692095
Bug: 15857302
Bug: 15632007

Change-Id: Ic321dfeb3438e47a0f7606a857511eb821161a0e
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
2d2e8d88103866b631eb0f3805da137ebcfb0275 23-May-2014 Yigit Boyar <yboyar@google.com> StaggeredGridLayoutManager for recycler view

Change-Id: Ie5466806aa0428a9f9f2b9eb6b85dbcfbbaebe5f
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
fe3996cf5af65fe11cc3ed47b67123ec267bd336 18-Jun-2014 Yigit Boyar <yboyar@google.com> Do not scrap invalidated views in RecyclerView

Bug: 15703871
Change-Id: Ib765ddd2ea5b5d897879f2387e8ae6a9f98e555e
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
7a59e4b36500bcfddd842376d6c3abe0d9f23d84 18-Jun-2014 Yigit Boyar <yboyar@google.com> Merge "findViewByPosition in RecyclerView should ignore removed children."
5ced882cabdcefbb469e332f6f73983999aad0e5 17-Jun-2014 Yigit Boyar <yboyar@google.com> findViewByPosition in RecyclerView should ignore removed children.

Bug: 15676570
Change-Id: I83aed0f0a8e0fee96fac194dd061ec0ca45ff27a
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
7e9da1a2629b657d56e2f54abd18c6249f3be037 14-Jun-2014 Yigit Boyar <yboyar@google.com> Check view type before re-binding ViewHolders in RecyclerView

Bug: 15596672
Change-Id: Ia42700e400b98b1020dbbba282d383da14d5816c
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
22b6b8163d2e15eb6d0a89906854dec801945f1d 13-Jun-2014 Yigit Boyar <yboyar@google.com> RecyclerView: Fix type-check bug for cached views

Change-Id: I1b6d33d7e1aeeb36e697cb95cd7109a9ac53a909
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
8ae76f91527ce850f155ce960fb9068bcd5d49f9 05-Jun-2014 Yigit Boyar <yboyar@google.com> Fixed RecyclerView position bookkeeping bugs

Bug: 15397591
Bug: 15350129
Bug: 15547859
Change-Id: I54d754eb2b788311048d7557f51967b748b2de3e
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
11b7cfea15306c0d6e4ed7da09f7698df01695df 03-Jun-2014 Yigit Boyar <yboyar@google.com> Fixed RecyclerView scrap matching bug

Bug: 15386994
Change-Id: If742678f83363b20f4e461060bd081ead0f07bf6
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
8edcb0bdeaba6931f9d8154f0c81f57da7ddab2a 31-May-2014 Yigit Boyar <yboyar@google.com> Fix SavedState bugs in LinearLayoutManager

Bug: 15343782, 14271688
Change-Id: Idbd23ce08b51746ccc17d3f2a81a6ed8349bd45c
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
b5f8b4fecb531aee6b359b4968409410aba90817 17-May-2014 Yigit Boyar <yboyar@google.com> Full animation support for LinearLayoutManager

Change-Id: Ie3b265a9f880d68746d1bd193d787f34ea8d0045
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
d7d27e9ebe5c7325e67e1a8af265378bd2056cad 28-Feb-2014 Chet Haase <chet@google.com> Add animations to RecyclerView

This CL adds the basic plumbing for animating item changes in
RecyclerView. It also implements the bare essentials add/delete
animations. When the app specifies that items have been
added/removed (by calling the appropriate Adapter methods), the
RecyclerView will determine the appropriate fading and moving
animations to animate the items being added, removed, and moved
into new locations.

Change-Id: I4fa8686f54c8bfa2ba29c399eea112d33f71689c
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
bde2d5e79f929ce8c54de29c8389695b4d4e9c25 15-May-2014 Chet Haase <chet@google.com> Revert "Remove adapter access from layout manager"

This reverts commit 15a9db9177a871c7b1cd65b8923beac1b9b75174.

Change-Id: Ia80ac4f093c49145a6a2c09d1ea4f9102b195f40
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java
15a9db9177a871c7b1cd65b8923beac1b9b75174 06-May-2014 Yigit Boyar <yboyar@google.com> Remove adapter access from layout manager

Change-Id: I33a48528e3290fa78aaa67237f3b098e010e09d9
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/BaseRecyclerViewInstrumentationTest.java