History log of /frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f009f639980abd669fd533e5bc6ed42f3d4ed9ff 26-Nov-2014 Yigit Boyar <yboyar@google.com> StaggeredGridLayoutManager gap handling bug fixes

There are two issues in StaggeredGridLayoutManager about how it handles gaps.

1) When move happens from a higher position to a lower one, it does not use the
correct index while invalidating span assignments

2) SGLM uses some logic to detect when gaps can occur. Unfortunately, that
logic does not handle the case where items right after a full span item is
invalidated but full span item is NOT invalidated. This CL fixes it.

Bug: 18525878

Change-Id: I28d2657b67d0792e333850afda375560981715ae
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.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/src/android/support/v7/widget/StaggeredGridLayoutManager.java
6490f4b25e7725acd06248f0247fb0c7634afcb1 13-Nov-2014 Yigit Boyar <yboyar@google.com> Compute scroll offset bugfixes

This CL fixes two related scroll offset calculation bugs in LayoutManagers.

LinearLayoutManager was not checking if View is visible when finding start and end
children. This creates a problem if extra space is not 0. This CL changes that code
to check item visibility and also prefer fully visible item if smooth scrolling
is disabled. Not doing so will create problems when top of the list is reached.

StaggeredGridLayoutManagerw was already checking item visibility but it was not
falling back to a partially visible child if none of the children is fully visible.
This would jump offset to 0 as no children can be found. Now, it accepts a partially
visible child if none of the children is fully visible.

Bug: 18314430
Bug: 18344415

Change-Id: Ie2710cb10289cad91af1901e7d15a6a1a96040c4
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
42e9353bb9eb2747247e30e3612b227945acfd16 06-Nov-2014 Yigit Boyar <yboyar@google.com> Respect layout params in scroll direction

This CL improves how StaggeredGrid handles layout params. Previously, it was
ignoring the layout params completely. Now, it considers it while measuring the
child in scroll direction.

Bug: 18242667
Change-Id: I8c98e866fb582e93fcab2223d4d345ebbf8fda02
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
52a47709e5ce81321bfa56b7595731a8e6835ef6 04-Nov-2014 Yigit Boyar <yboyar@google.com> Don't limit lookup size w/ adapter size

This CL changes StaggeredGridLM not to limits its lookup table w/ adapter size.
This behavior was acceptable when adapter size was equal to state size but it is
not the case anymore.

Bug: 18198525
Change-Id: I1f89ed1e9be5571013f647df2a547e6cb6d11377
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
ffff7c903fa7dbf176fd251f77a959e6b9531456 09-Oct-2014 Yigit Boyar <yboyar@google.com> Make sure orientation helper is initialized before accessing

Bug: 17724151
Change-Id: Idc8ce16d0c3c325ef5a90b41330d3f109517fe17
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
a7ace2509a51ff37d520ec753f544c6e2bb812be 01-Oct-2014 Yigit Boyar <yboyar@google.com> Merge "Assign View spans before they are measured" into lmp-mr1-dev
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/src/android/support/v7/widget/StaggeredGridLayoutManager.java
7499c6e5b853057aa81bfc20c39e6fa188805c55 29-Sep-2014 Yigit Boyar <yboyar@google.com> Add a getter for StaggeredGridLayoutParams' full span field
Bug: 17693432
Change-Id: If683db46e2fe7655ac611e368baac5dc16a05816
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
a910619e83d0052e1d81aa5fe532821a2f99d76c 09-Sep-2014 Yigit Boyar <yboyar@google.com> Add a11y support for RecyclerView

Bug: 17411052
Change-Id: I9ef93f0bb072e190d6017ee991e6d2c0ab119a62
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.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/src/android/support/v7/widget/StaggeredGridLayoutManager.java
b8403301bbec29129730f6cce3fe2fa3ee8e1e0b 06-Aug-2014 Yigit Boyar <yboyar@google.com> Dont save config parameters in saved state

Bug: 16822490
Change-Id: I2c652bf96f583443ab6402969d3fedf652b9ec04
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.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/src/android/support/v7/widget/StaggeredGridLayoutManager.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/src/android/support/v7/widget/StaggeredGridLayoutManager.java
7c7fba8365684e1ccfc4f39f286df4d100c6c81f 21-Jul-2014 Justin Klaassen <justinklaassen@google.com> Support predictive change animations

Currently appearing views are not positioned correctly when performing a
predictive animation due to a change in the underlying dataset. To allow the
LayoutManager to supply pre-layout info for the appearing views, allow the
changed view to be scrapped and preserved during the pre-layout pass / change
animation.

Bug: 16040380
Change-Id: Ib4ed1b4fee1965cae356e6ba1b6e6d7a8ea52e67
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
333382aecf6822cb1ec484e8d3e4e822c9bd0c8d 18-Jul-2014 Yigit Boyar <yboyar@google.com> Add find first-last visible view methods to StaggeredGrid

This CL also improves how grid layout recovers when span count is
changed before state is saved

Change-Id: Ifdb9b00642e599e57b968db682cd871ecad1ba03
Bug: 16335426
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
6e43f4f95e3ce4a8a14d7ecf0b14a647eba72e93 08-Jul-2014 Yigit Boyar <yboyar@google.com> Merge "Fix StaggeredGrid layout to support clipToPadding=false"
719a0dfbcf2ca2b63cc3ce1e7ab18eadb3694f2c 03-Jul-2014 Yigit Boyar <yboyar@google.com> Choose a valid anchor child in LayoutManagers

If predictive animations do not run, RecyclerView may call LayoutManager with children whose
positions are wrong (in case they are deleted). This diff improves anchor child selection logic
to ensure child has a reasonable position.

It might be a good idea to bring back RecyclerView's notifiyDataSetChanged position handler
to make this easier for LayoutManagers (though they still need this code to avoid bugs).

Bug: 15691747
Change-Id: Ia341397a835e0120d172691921466401022868d3
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
0ae47e8ceb8062ba460c74149b009cf7914388ea 02-Jul-2014 Yigit Boyar <yboyar@google.com> Fix StaggeredGrid layout to support clipToPadding=false

This change also introduces a way to LayoutManager to force simple
animations if possible

Bug: 15988721

Change-Id: I3726090f9510c14732f67b19e0eab2340cda562e
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.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/src/android/support/v7/widget/StaggeredGridLayoutManager.java
501b13667b2cc4426b7b69e015a1ded9c0b13352 28-Jun-2014 Yigit Boyar <yboyar@google.com> Merge "Fixed a bug where RecyclerView would not re-bind invalid children"
03a57e1f233833f7d5706bfacb0d5c84d4a039e9 27-Jun-2014 Yigit Boyar <yboyar@google.com> Fixed a bug where RecyclerView would not re-bind invalid children

When an adapter update happens which does not include item addition-removal, I was checking
the wrong boolean which was causing views not being rebind (or layout not being invalidated)
This CL addresses that issue with some other updates in StaggeredGridLayoutManager test

Change-Id: I7f39713b5dc3e5d66306677f06db9774df6f75ff
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
9bea36cf2e318e9b729ddc62d855cd0f93bc3866 27-Jun-2014 Yigit Boyar <yboyar@google.com> Update StaggeredGridView to use new RecyclerView animations

StaggeredGridView used to track of removed children. Since RecyclerView
does it automatically now, we don't need this bookkeeping anymore.

I also added orientation constants to make it cleaner for the constructor

Change-Id: Ibac99d98fee5d89723f2e4fb77072d8461ebe3fb
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java
9571b25f2ecbcd917b9d577961e99f572efa0353 27-Jun-2014 Yigit Boyar <yboyar@google.com> Merge "Fixed RecyclerView edge effect problems"
3ed05355fded55e438477b23a1864c3b6d129342 27-Jun-2014 Yigit Boyar <yboyar@google.com> Fixed RecyclerView edge effect problems

This fixes an issue where RecyclerView glows were not drawn in correct location.

It also changes how LayoutManagers handle padding. Now LinearLayoutManager and
GridManager both ignore padding for recycling.

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

Change-Id: Ie5466806aa0428a9f9f2b9eb6b85dbcfbbaebe5f
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/StaggeredGridLayoutManager.java