History log of /frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
78f659a66b021d5d0e36800a7144e956d8054cea 09-Dec-2014 Yigit Boyar <yboyar@google.com> Don't stop scrolling if scroller reports 0 diff

Bug: 18667843
Change-Id: Ie05dbc2b198ee7b5eb83bf36e9c7f01e59b5e14c
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
0c9222b8ff65798fa394eb4df49755a34150c1d5 02-Dec-2014 Yigit Boyar <yboyar@google.com> Merge "Enable getAdapterPosition when View is rebound" into lmp-mr1-dev
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/RecyclerViewLayoutTest.java
3f937299abacc5ff1be7a5ffa91793396aca0a57 26-Nov-2014 Yigit Boyar <yboyar@google.com> Remove transient views if necessary

This CL fixes a bug where if a disappearing ViewHolder's animation count
reaches to 0 but it is not removed due to its transient state.
We don't care about it anymore and let Adapter decide if it is recycleable
but we should still remove it.

I would actually prefer to update ViewHolder#isRecycleable but it is public
API and changes may break external code so created a different internal
method.

Bug: 18248568
Change-Id: I6a89bc0a2249ea4f0effc90ef2636e1ce69e283f
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
4965046abec63014d2a5e7f72f6c9e11b73a4907 25-Nov-2014 Yigit Boyar <yboyar@google.com> Trigger on scroll callback if position changes during a layout

Bug: 18433923
Bug: 18248568
Change-Id: Iae93ebe2f9c850aee70c2efcd71f2da7301940ae
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
9c0a9654497b759feef634e3d574c511d4d4ef4e 25-Nov-2014 Yigit Boyar <yboyar@google.com> Merge "Fixed minor bugs in RV's scroll handling." into lmp-mr1-dev
670a72b9301fa53a763344036e4d3ff1995f36df 24-Nov-2014 Yigit Boyar <yboyar@google.com> Fixed minor bugs in RV's scroll handling.

This CL fixes two issues related to how RV handles scrolling.
Previously, if layout manager supports scrolling in both directions, RecyclerView
would stop flinging if LayoutManager cannot scroll as much as requested
in both directions. Now, it continues even if only one of them is fully consumed.

This CL also fixes a bug where if fling or smooth scroll is manually called, we would not
check if LayoutManager supports scrolling in that axis. This would result in unexpected
calls to LayoutManager which may create problems if it is a generic one that supports
both orientations (like the default ones). Now, we'll check if LM supports scrolling
in that axis in public scroll/fling methods.

Bug: 18208220
Change-Id: Ia8e30a3b822b06cf275ae6c2de7e64b8e70e4d59
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.java
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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.java
6b4d950d0d1e26165a1e643a2fd1fe4e283786f1 31-Jul-2014 Yigit Boyar <yboyar@google.com> Fix StaggeredGrid crash: Saving state of an emty Span

Bug:16644724
Change-Id: Id0567d6f3dc7ab8621774fe147ab0dc8c5b98e61
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
66a5670ac0e58e1d08f6af57b13648c1ab9df441 26-Jul-2014 Yigit Boyar <yboyar@google.com> Change public recyclerview to unscrap views

Bug: 16201361
Bug: 15910842
Change-Id: I5453f9ed33c88c5a0d92f617a4f57cf938be4ec0
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
ee30f03253207f694cc46063b0c8c7cb91d24a6e 28-Jul-2014 Yigit Boyar <yboyar@google.com> Update scroll target if it is removed while scrolling

Bug: 15933296
Change-Id: If576382c3ca64060bc62cd9437c7b6993b8ccb11
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
bc2c6d6432a227d46a43fd18eb204d89ca472064 25-Jul-2014 Yigit Boyar <yboyar@google.com> Add an API to mass invalidate decor offsets

Bug: 16549198

Change-Id: I24c40aef0a988622d256214fb58e1c2a2daf43c0
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
5cfed5428d421f179f83382ad72ec6edd11a066d 23-Jul-2014 Yigit Boyar <yboyar@google.com> Update state on onMeasure call in RecyclerView

Bug: 16187385

Change-Id: Ifee446c47d49536327f34233a853929c6cf2a196
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.java
6e560171b774afafd572b1896becac7b308a92e6 16-Jul-2014 Yigit Boyar <yboyar@google.com> RecyclerView should skip ignored children in mass recycle

Bug: 16322508
Change-Id: Ieddc317771538c7cdab29a2e4898df05706fd6ba
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.java
38efc791651510a8bc815a707e105554e3bf99f2 11-Jul-2014 Yigit Boyar <yboyar@google.com> Fix RecyclerView to recyle invalid scrap properly

Bug: 16210009
Change-Id: Id4cdf1ef87aaa52581009b651690abbf90ad4522
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.java
0bdfd8728199045676f3ad6c6571e7080099716f 30-Jun-2014 Yigit Boyar <yboyar@google.com> Validate layout and scroll only methods in RecyclerView

If an adapter update method or LayoutManager configuration method is called
during a layout or scroll; it creates very hard to detect bugs.

With this change, RecyclerView, LinearLayoutManager and
StaggeredGridView starts checking some of these potential mistakes.
Coverage can be extended.

Bug: 15615904

Change-Id: I07a4fcf59d02af09e634b4a4eff090538d051d3e
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.java
bbf19899050278ae64da0a8bfce209a9f359c853 27-Jun-2014 Yigit Boyar <yboyar@google.com> Do not trigger layout when RecyclerView is detached

Bug: 15911289
Change-Id: I654bdcdadf94956b917614e0a3fbee214877e4d8
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
49c83b12201dde5b93d4eca3d44478e0c967a2e6 26-Jun-2014 Yigit Boyar <yboyar@google.com> Pass recycler to LayoutManager#onDetach callback

Bug:15736907
Change-Id: I6cd50800ebae0ff10b99665fcda77b0da411065c
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.java
668e774379c036a5d53d07ec69ed9ebee13a1fd9 20-Jun-2014 Yigit Boyar <yboyar@google.com> Track hidden views to allow interleaved disappearing children in RecyclerView

RecyclerView used to put animating views at the end of the view group list
which may cause problems if views overlap. Instead, this implementation keeps
track of hidden item positions.

This CL also removes the requirement to not to call addView for disappearing
children. Instead, LayoutManager can add children via addView (if it is removed)
or addDisappearingView (if LayoutManager want to remove it) and RecyclerView
will hide those views from the LayoutManager after the layout pass is complete.

This CL also enabled animations even if no item changed notifications are
received from Adapter. This is useful when LayoutManager changed how it lays
out views w/o any change in the adapter. LayoutManger can still disable this
feature via existing animations callbacks.

Change-Id: I1aee1832ba1d4e5aff4213bc73fa77a52b70a83d
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.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/RecyclerViewLayoutTest.java