• Home
  • History
  • Annotate
  • only in /frameworks/support/v7/recyclerview/tests/src/android/support/
History log of /frameworks/support/v7/recyclerview/tests/src/android/support/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5c1fb3fbf627905b9c14785007f12ae5dfac3f3e 22-Jul-2015 Vadim Tryshev <vadimt@google.com> am c0d8d3f8: Merge "Hiding removed child views from accessibility." into lmp-mr1-ub-dev

* commit 'c0d8d3f89413a652a64e99485d93230437e20166':
Hiding removed child views from accessibility.
c0d8d3f89413a652a64e99485d93230437e20166 22-Jul-2015 Vadim Tryshev <vadimt@google.com> Merge "Hiding removed child views from accessibility." into lmp-mr1-ub-dev
344e49fcc92aba485da10a983fe916e2e4750a77 30-May-2015 Vadim Tryshev <vadimt@google.com> Hiding removed child views from accessibility.

Accessibility code won't know that hidden child views of RecyclerView
exist. Such views exist during animations that collapse deleted child
views.

Implemented with setImportantForAccessibility. There was an attempt
to implement this using AccessibilityNodeProvider, but after some
soul-searching with accessibility pundits, it was decided that
AccessibilityNodeProvider doesn't quite match this scenario, so I
fell back to the 'mark as important' approach.

Bug: 20055027
Change-Id: Ibb8478ed85990248821ccb1d772b4f2f9c02aa74
7/widget/RecyclerViewAnimationsTest.java
9fd26acc8ba916e1ef663984c92768c49982c543 21-Jul-2015 Yigit Boyar <yboyar@google.com> am e8ad8272: Merge "Don\'t reset modes when nested scrolling stops" into lmp-mr1-ub-dev

* commit 'e8ad827259c6c455de84a05d5fbf2a8aa38f0120':
Don't reset modes when nested scrolling stops
1e512760b1db986c428c7305476c50065c1d1eb0 20-Jul-2015 Yigit Boyar <yboyar@google.com> Don't reset modes when nested scrolling stops

Bug: 20857006
Change-Id: I67bf13442674006cdd116068c2c55e3c439bd860
7/widget/TestedFrameLayout.java
ee20135f435ca237680b38a2c7893302ce969ef7 17-Jul-2015 Dake Gu <dake@google.com> resolved conflicts for merge of ef3e37fe to mnc-dev

Change-Id: I49b96358a0d5e6dec16503379e488fcc0c6db52c
ef3e37fe088c7d8e614bbc4ed58d6c0d3fa807a1 29-Jun-2015 Dake Gu <dake@google.com> RecyclerView: add setLayoutFrozen(boolean)

Add a method to stop recyclerview from udating children.
Including:
- delay the adapter change.
- stop scroll and inner scroll
- stop scroll animation
- cancel ItemTouch helper (dragging)

b/22067316

Change-Id: I24e7baf3477022025a2bba8e56343c5af7196403
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewLayoutTest.java
aafd83e513eaede1fa96ff7a28ba98f955f11f9f 14-Jul-2015 Yigit Boyar <yboyar@google.com> am df73aa2f: Merge "Mark RecyclerView as scroll container" into lmp-mr1-ub-dev

* commit 'df73aa2fc5a55da363b3fe2b99fa3da299878f0e':
Mark RecyclerView as scroll container
df73aa2fc5a55da363b3fe2b99fa3da299878f0e 14-Jul-2015 Yigit Boyar <yboyar@google.com> Merge "Mark RecyclerView as scroll container" into lmp-mr1-ub-dev
ec2139270829c55b0c50c62612306c18b8c0b98b 14-Jul-2015 Chris Banes <chrisbanes@google.com> am 1629c7c8: Merge "Allow vertical dragging of AppBarLayout" into lmp-mr1-ub-dev

* commit '1629c7c8561372ec8a97df983edad01e0657b1d9':
Allow vertical dragging of AppBarLayout
1629c7c8561372ec8a97df983edad01e0657b1d9 14-Jul-2015 Chris Banes <chrisbanes@google.com> Merge "Allow vertical dragging of AppBarLayout" into lmp-mr1-ub-dev
2e77812ce07e7c4930ec018eb9e2d5ee4618208b 14-Jul-2015 Yigit Boyar <yboyar@google.com> am 92399516: Merge "Don\'t cap measure spec in scroll orientation" into lmp-mr1-ub-dev

* commit '92399516517b88d76cbadba69fefb11611fba277':
Don't cap measure spec in scroll orientation
d4c72f08279df548fbc4d556fe1a8b3500fafdbc 15-Jun-2015 Chris Banes <chrisbanes@google.com> Allow vertical dragging of AppBarLayout

Also fixed onStopNestedScroll() not being called
from NestedScrollView and RecyclerView

BUG: 21843568
BUG: 20679299

Change-Id: I1b19d7cae2db403ede30fc9116ea05aace586b3b
7/widget/RecyclerViewLayoutTest.java
7/widget/TestedFrameLayout.java
6bc164c64d7f4cea6a1f155439269fd189a77d3b 07-Jul-2015 Yigit Boyar <yboyar@google.com> Mark RecyclerView as scroll container

This is necessary to properly handle window size changes.

Bug: 22324832
Change-Id: I109db3db4a60eb43ea01e6d240e973bad9c3df57
7/widget/RecyclerViewBasicTest.java
3bc9692bd8ee36a1eced339564ea6eaa4c8261db 06-Jul-2015 Yigit Boyar <yboyar@google.com> Don't cap measure spec in scroll orientation

This CL fixes a bug where GridLayoutManager would use wrong measure
specs for a View if it has fixed size in the scroll orientation.

Bug: 22296763
Change-Id: Iab3bc64da619958d7b5a63d89aca77e91b5fa454
7/widget/GridLayoutManagerTest.java
fbb5f81801bd50e630ac655943570544dee1627f 24-Jun-2015 Dake Gu <dake@google.com> am 9ff4326f: Merge "RecyclerView: Add payload for efficient bind" into lmp-mr1-ub-dev

* commit '9ff4326fe5136a9e6b40c7e6573720efa89013cd':
RecyclerView: Add payload for efficient bind
21b345f101abc385496f42d250e580d21f1287b6 04-Jun-2015 Dake Gu <dake@google.com> RecyclerView: Add payload for efficient bind

Add an optional payload in onBindViewHolder and notifyItemChanged.
The payload can be used to indicate the partial change
of an item so that onBindViewHolder can do an efficient rebinding.

We are going to add in-place Change animation in next CL. The in-place
Change animation happens on the existing holder, Adapter will receive
a payload in onBindViewHolder.

The existing crossfading CHANGE involves two viewHolders, the oldViewHolder
is faded out without rebinding, the newViewHolder is binding to a
scrap view and faded in.

Change-Id: I117e5fe24d757dc89e68bb5860b5f4fb71bd9cf5
7/widget/RecyclerViewAnimationsTest.java
c138e489f02b120eb5085228f69ff47c5cc7626d 19-Jun-2015 Yigit Boyar <yboyar@google.com> am e1cd8d86: Fix LinearSmoothScroller NPE bug

* commit 'e1cd8d86d84646768867eeaeb038e1c135ca3e4c':
Fix LinearSmoothScroller NPE bug
e1cd8d86d84646768867eeaeb038e1c135ca3e4c 09-Jun-2015 Yigit Boyar <yboyar@google.com> Fix LinearSmoothScroller NPE bug

This CL fixes a bug where LinearSmoothScroller would try to access
RecyclerView after it is stopped.

This was actually caused by a bad API so I deprecated it in favor
of a more open API. This new API, jumpTo also allows instantly
scrolling to a position in case target position is far away.

Bug: 21661478
Change-Id: I3c4bfa8589803a564a61116e73d8b1312c6c9f46
7/widget/RecyclerViewLayoutTest.java
01eb772d000267f342acfa723cc3e23ec9060855 19-Jun-2015 Yigit Boyar <yboyar@google.com> am 5fa74626: Merge "Remove package private method access from LinearLayoutManager" into lmp-mr1-ub-dev

* commit '5fa7462620aaa4c7cf012a4acfaa189d37cf9a6b':
Remove package private method access from LinearLayoutManager
364ca611da0789aefae36126a8e302abaefa0d48 17-Jun-2015 Yigit Boyar <yboyar@google.com> Remove package private method access from LinearLayoutManager

This CL removes some package private access to RecyclerView from
LinearLayoutManager. This is useful when people try to customize
it.
We should deprecate getScrapList : ViewHolder API to avoid further
similar problems. LayoutManager should not be accessing the view
holder and this API is creating problems.

I also fixed a layout test which was going into recursion.

Bug: 21847010
Change-Id: Ibfbd5b817affd7c93aafc0ca6cd99f62313be556
7/widget/RecyclerViewLayoutTest.java
57e492dee4430a484fbfdb6b66f790483d1a6c50 11-Jun-2015 Vladislav Kaznacheev <kaznacheev@google.com> am a9154c46: Merge "Implemented AsyncListUtil" into lmp-mr1-ub-dev

* commit 'a9154c461a4472d9dc4772126a6cfddfddd035fb':
Implemented AsyncListUtil
a9154c461a4472d9dc4772126a6cfddfddd035fb 11-Jun-2015 Vladislav Kaznacheev <kaznacheev@google.com> Merge "Implemented AsyncListUtil" into lmp-mr1-ub-dev
a1470623b0f7c52c9e3985012bf9daeb692d7bcc 10-Jun-2015 Vladislav Kaznacheev <kaznacheev@google.com> Implemented AsyncListUtil

This is a utility class that supports asynchronous
content loading.

It can be used to load Cursor data in chunks without
querying the Cursor on the UI Thread while keeping UI
and cache synchronous for better user experience.

Bug: 20180767
Change-Id: I2872cd0f4a3eca89c054c006ac5e18523e073510
7/util/AsyncListUtilTest.java
7/util/MessageQueueTest.java
7/util/ThreadUtilTest.java
7/util/TileListTest.java
7/widget/AsyncListUtilLayoutTest.java
194798e392e5d52d71085285011c4b80374d1844 10-Jun-2015 Vladislav Kaznacheev <kaznacheev@google.com> am c9d554f5: Merge "Delay restoring RecyclerView layout state until adapter is non-empty" into lmp-mr1-ub-dev

* commit 'c9d554f5655a85f1b446c988ff94d32e54557899':
Delay restoring RecyclerView layout state until adapter is non-empty
c9d554f5655a85f1b446c988ff94d32e54557899 10-Jun-2015 Vladislav Kaznacheev <kaznacheev@google.com> Merge "Delay restoring RecyclerView layout state until adapter is non-empty" into lmp-mr1-ub-dev
87c9c97155d4742e7e6f0758394b5b6d12cfaee6 10-Jun-2015 Yigit Boyar <yboyar@google.com> am 429a9029: Check for layout before handling touch events

* commit '429a9029d941a91972cd7601aa7e6d3718872c65':
Check for layout before handling touch events
bf95798f3388a3f1fe7e07a2182e6a4b80670a17 10-Jun-2015 Yigit Boyar <yboyar@google.com> am 5321949b: Merge "Make SGLM view snap test less flaks" into lmp-mr1-ub-dev

* commit '5321949b1ca4113d9ebd5ca488a27f17224118a1':
Make SGLM view snap test less flaks
a59345d9cef037c8cf5be767cb716ac91bbe1eaf 10-Jun-2015 Yigit Boyar <yboyar@google.com> am 8a1422f3: Merge "End animations on scrap views, clear updated views from cache" into lmp-mr1-ub-dev

* commit '8a1422f3422177490f7e36bd93537108392cb3dd':
End animations on scrap views, clear updated views from cache
6e6e7993d801d52e0d6bba37d3ebfc34f6d474d2 10-Jun-2015 Yigit Boyar <yboyar@google.com> am d76f3572: Merge "Prioritize delete animation over move animation" into lmp-mr1-ub-dev

* commit 'd76f3572af33c544d6bac87bd144056f196d8cad':
Prioritize delete animation over move animation
3d8453880afb3e32c4c59c52b8b580f91d78b29f 20-May-2015 Vladislav Kaznacheev <kaznacheev@google.com> Delay restoring RecyclerView layout state until adapter is non-empty

Bug:16901000
Change-Id: I28c9252f7b9f0c782496a2c8ea77a6eb791ab0d4
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/StaggeredGridLayoutManagerTest.java
429a9029d941a91972cd7601aa7e6d3718872c65 09-Jun-2015 Yigit Boyar <yboyar@google.com> Check for layout before handling touch events

This CL fixes a bug where RecyclerView would access layout
in motion event callbacks w/o checking if it exists

Bug: 21614659
Change-Id: I2cc6eb3afa1d24404c00bcc6c0cc7a30d441a1de
7/widget/RecyclerViewBasicTest.java
5321949b1ca4113d9ebd5ca488a27f17224118a1 09-Jun-2015 Yigit Boyar <yboyar@google.com> Merge "Make SGLM view snap test less flaks" into lmp-mr1-ub-dev
8a1422f3422177490f7e36bd93537108392cb3dd 09-Jun-2015 Yigit Boyar <yboyar@google.com> Merge "End animations on scrap views, clear updated views from cache" into lmp-mr1-ub-dev
29c349ed8863cc15c2580465227c37771ac49576 09-Jun-2015 Yigit Boyar <yboyar@google.com> Make SGLM view snap test less flaks

This CL fixes a bug in SGLM view snapping test where it
may fail if device's size is not a multiple of span size.

Change-Id: I8c7e4d35018921afcc7bd2b6f7d0493dbfb98b92
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/StaggeredGridLayoutManagerTest.java
5a9366fba5e26329bc9a988cfd2d43df980f2764 09-Jun-2015 Yigit Boyar <yboyar@google.com> Prioritize delete animation over move animation

RecyclerView was running a move animation when an item
is deleted but also moved. We should run delete animation
instead to make sure proper callbacks arrive.

In the future, this can be changed but for now, it is not
LayoutManager's responsibility to move a deleted item so
occurrences of a "deleted item being moved" can be ignored.

Bug: 21639668
Change-Id: I5b1cfa37a7e5e7a2ef34d7cc76fbebc41907cf9a
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
cc1bf428e5bdbcc94e58107da4a100b279810a64 05-Jun-2015 Yigit Boyar <yboyar@google.com> End animations on scrap views, clear updated views from cache

This CL fixes a bug where we would not remove updated views
from cache which was bad utilization of cache since they'll
need to be rebound anyways and they could be rebound back in
preLayout with their bad state.

I also changed how we handle remaining scrap views at the end
of a layout. We used to recycle them wihtout ending their
animations which would prevent them from being recycled.
Instead, we first end their animations inside a recycle
barrier and then recycle them.

I also did some cleanup in layout tests to make them easier
to read :).

Bug: 21615412
Change-Id: Ic4fecfe9b78ee66e46b13bff83cf903be2cc2e1a
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewLayoutTest.java
85d8d1b785865134ceb27b868943db5278ed2e83 05-Jun-2015 Yigit Boyar <yboyar@google.com> am d3a5aa04: Merge "Prevent preLayout span size lookup calls" into lmp-mr1-ub-dev

* commit 'd3a5aa04032451e83575a7756d972ea1e6a68f80':
Prevent preLayout span size lookup calls
cf87e0b2827dba309646d6a73945b2e1d1fac248 03-Jun-2015 Yigit Boyar <yboyar@google.com> Prevent preLayout span size lookup calls

GridLayoutManager had a bug where the code path which
selects a View to be the anchor view was not going through
the cached span size lookup method. This could be a
problem because it misses the pre-layout cache and the
position is not converted into an adapter position,
possibly triggering an index out of bounds exception on
the SpanSizeLookup class.

This CL changes that method to use the cache. CL is
bigger than the actual change because I had to update method
signatures to be able to pass recycler and state objects
down to the lookup methods

Change-Id: I524504ae3ea3356b8a1b16b78924258003f6169e
Bug:21590767
7/widget/GridLayoutManagerTest.java
396bb5649eb4b47681259ab8b6515a535217f68c 06-May-2015 Yigit Boyar <yboyar@google.com> am b1771617: Merge "Improve some tests" into lmp-mr1-ub-dev

* commit 'b1771617164fa8608bfc4b461a50888d51be4763':
Improve some tests
629687bba8da1a73c48d8fe87393a13581ce46ca 05-May-2015 Yigit Boyar <yboyar@google.com> Improve some tests

This CL fixes some tests that are failing in the emulator

Bug: 20857006
Change-Id: I8f669678403e33d16af3e2de29851d6fcc7cab13
7/recyclerview/test/PrivateLayoutManager.java
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/helper/ItemTouchHelperTest.java
4ef3b3400174790d6d060c08c25e3f429e68de62 05-May-2015 Chris Banes <chrisbanes@google.com> am 46762cc1: Merge "Nested Scrolling support for RecyclerView" into lmp-mr1-ub-dev

* commit '46762cc1d7e8ab8a12fc8804d0641d54b710881d':
Nested Scrolling support for RecyclerView
f129f1b050d2542a91fe8175eac30183beb07b41 20-Apr-2015 Chris Banes <chrisbanes@google.com> Nested Scrolling support for RecyclerView

Also fixed annotation for ViewCompat's overscroll

BUG: 20334660

Change-Id: Iafa2f52f63d9aa9d5c8ce10b5e8bf108c1407a12
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/TestActivity.java
7/widget/TestedFrameLayout.java
b72eab7e746ced94b70d2b075280bdb2ebf9aed6 05-May-2015 Yigit Boyar <yboyar@google.com> am ec494eb6: Make constructor accessible before calling

* commit 'ec494eb6490aae36981351d80c778031efcf2ebe':
Make constructor accessible before calling
ec494eb6490aae36981351d80c778031efcf2ebe 04-May-2015 Yigit Boyar <yboyar@google.com> Make constructor accessible before calling

ART fixed newInstance method's accessibility checks which means if
provided class/method is not accessible; RecyclerView will crash.

This CL makes RecyclerView call setAccessible(true) before calling
the constructor to avoid any issues after new ART is released.

Bug: 20824258
Change-Id: Iea114b8265720f99d95a1486d692e7e787746f8b
7/recyclerview/test/PrivateLayoutManager.java
7/widget/test/RecyclerViewTest.java
4cddf7582f832aedf3a3c96af3f16f72592bb592 02-May-2015 Yigit Boyar <yboyar@google.com> am c49a069d: Merge "Fix SGLM child position bug" into lmp-mr1-ub-dev

* commit 'c49a069d9dfa5b67ad9c74870ba6246c4aa8b908':
Fix SGLM child position bug
e05fbd9cfe05496e82a3abe19e07e8745985e9a5 27-Apr-2015 Yigit Boyar <yboyar@google.com> Fix SGLM child position bug

Looks like SGLM had a bug where it would put children with gaps
when filling above and below anchor line. This would mostly happen
if clip to padding is false because it was not properly handling
clip to padding.

This CL changes how SGLM handles recycling in a long with fill state
preparetion. This also makes it 100% compatible with clip to padding
false.

Bug: 20565830
Change-Id: Iae9a5bd50865e552120f85c8f511986c8e9f4395
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/StaggeredGridLayoutManagerTest.java
081bdb37beffedfd2b5359a181a6c8d1679ec2b4 30-Apr-2015 Yigit Boyar <yboyar@google.com> am be7a54a6: Integrate espresso w/ RecyclerView. Hi Junit4 !

* commit 'be7a54a6e02c9230a08e63f1c964907d129b6a10':
Integrate espresso w/ RecyclerView. Hi Junit4 !
be7a54a6e02c9230a08e63f1c964907d129b6a10 07-Apr-2015 Yigit Boyar <yboyar@google.com> Integrate espresso w/ RecyclerView. Hi Junit4 !

This change also adds support for running testes on host machine.

Bug: 20258423
Change-Id: Ic8bd569d852a7d6d1c74c5fc4a4bf16703f71e52
7/util/SortedListAdapterCallbackWrapperTest.java
7/util/SortedListTest.java
7/widget/AdapterHelperTest.java
7/widget/OpReorderTest.java
7/widget/RecyclerViewLayoutTest.java
a6f6599f8c8d258599749ee527228ad394934f9c 22-Apr-2015 Yigit Boyar <yboyar@google.com> am e71a1df9: Item touch interactions helper class

* commit 'e71a1df9b3c0e1bd3c21a1b3dd20a41790d4a950':
Item touch interactions helper class
e71a1df9b3c0e1bd3c21a1b3dd20a41790d4a950 06-Jan-2015 Yigit Boyar <yboyar@google.com> Item touch interactions helper class

Notice: TBR, APIs may change

This CL adds a component that can attach to any RecyclerView
and add support for Drag & Drop and Swiping.

It assumes some defaults based on the scroll orientation of
the LayoutManager but can also be extended to customize behavior.

Bug: 18889496
Change-Id: I7aede2084efa599552e053596661fa58b2685d10
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/WrappedRecyclerView.java
7/widget/helper/ItemTouchHelperTest.java
0e2e979afc3e1067c2af8db4c7a3bda4f0a1842b 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Revert "Revert "Inflate RV attr to create the layout manager.""

This reverts commit 4d7dbfd2b24b8ebc49d3be5e0b5cbac76b2751ed.

(cherry picked from commit 0194ed84ad6f1d3d489db52b9431fa93a7697b50)
7/recyclerview/test/CustomLayoutManager.java
7/widget/test/RecyclerViewTest.java
7/widget/test/RecyclerViewTestActivity.java
0194ed84ad6f1d3d489db52b9431fa93a7697b50 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Revert "Revert "Inflate RV attr to create the layout manager.""

This reverts commit 4d7dbfd2b24b8ebc49d3be5e0b5cbac76b2751ed.
7/recyclerview/test/CustomLayoutManager.java
7/widget/test/RecyclerViewTest.java
7/widget/test/RecyclerViewTestActivity.java
5e957926b56f6ba0831a4b1994e5adaba37f8cb7 14-Apr-2015 Yigit Boyar <yboyar@google.com> am 6d918e65: Merge "Fix layout state setup for predictive layouts" into lmp-mr1-ub-dev

* commit '6d918e651619e35e74fc9d8f0842d9083d97ea0f':
Fix layout state setup for predictive layouts
6d918e651619e35e74fc9d8f0842d9083d97ea0f 14-Apr-2015 Yigit Boyar <yboyar@google.com> Merge "Fix layout state setup for predictive layouts" into lmp-mr1-ub-dev
fdbd49decd8805769b3f17095e22e69a15102232 14-Apr-2015 Yigit Boyar <yboyar@google.com> am 696981cd: Merge "Revert "Inflate RV attr to create the layout manager."" into lmp-mr1-ub-dev

* commit '696981cd8025e64e217336a2e5eccc0ce3358a87':
Revert "Inflate RV attr to create the layout manager."
696981cd8025e64e217336a2e5eccc0ce3358a87 14-Apr-2015 Yigit Boyar <yboyar@google.com> Merge "Revert "Inflate RV attr to create the layout manager."" into lmp-mr1-ub-dev
4d7dbfd2b24b8ebc49d3be5e0b5cbac76b2751ed 14-Apr-2015 Yigit Boyar <yboyar@google.com> Revert "Inflate RV attr to create the layout manager."

This reverts commit 044b5b61e962367ccfc80250676eb98c86910877.
All dependent projects has to be changed to include RV resources before this can be merged.

Change-Id: I3d0af4345f9d838cc53d7ce34d81280cc7499760
7/recyclerview/test/CustomLayoutManager.java
7/widget/test/RecyclerViewTest.java
7/widget/test/RecyclerViewTestActivity.java
ee34066c336e84f0fccddcbf8fc2795ccb9d2098 14-Apr-2015 Deepanshu Gupta <deepanshu@google.com> am 282154bd: Merge "Inflate RV attr to create the layout manager." into lmp-mr1-ub-dev

* commit '282154bd6d9b079324b858540e3bdc48687072e3':
Inflate RV attr to create the layout manager.
282154bd6d9b079324b858540e3bdc48687072e3 14-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Inflate RV attr to create the layout manager." into lmp-mr1-ub-dev
c5b63dbc5a1c35997a15cd8f47febe2cfb788f93 14-Apr-2015 Yigit Boyar <yboyar@google.com> am b7c7aa26: Merge "Fix find first/last child logic for big views" into lmp-mr1-ub-dev

* commit 'b7c7aa26a71e992ff9f54a52e786e3b412ab7ff8':
Fix find first/last child logic for big views
b7c7aa26a71e992ff9f54a52e786e3b412ab7ff8 14-Apr-2015 Yigit Boyar <yboyar@google.com> Merge "Fix find first/last child logic for big views" into lmp-mr1-ub-dev
888093b0a071a99d65c01116cf703d46b21f9918 14-Apr-2015 Yigit Boyar <yboyar@google.com> Fix layout state setup for predictive layouts

When setting up layout state for scrap list (predictive layout pass),
we would not set currentPosition properly since the next view
was already defined by distance.
This was creating an issue in GridLayoutManager because it uses
this position to call SpanSizeLookup before accessing the View.
GridLayoutManager should work that way because it should avoid
getting a View from next row / column (in the case when next View
does not fit current row).

LayoutState could also return null View even if hasMore() returns
true which was part of the reason for this bug.

This CL fixes that issue and also adds logic to calculate
LayoutState#currentPosition from scrap list. It is a bit slower
because I wanted to keep this CL minimal. Can be optimized but
it is not event a hot code path so not very important anyways.

Also added a test for the crash and more assertions to guarantee
currentPosition and hasMore methods.

Bug: 20158083
Change-Id: Iefd4775161485185fc6255a20cddc3bddfd04134
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/GridLayoutManagerTest.java
7/widget/LinearLayoutManagerTest.java
e446af401de362f3c8fd47665fbacf6d3541e191 10-Apr-2015 Yigit Boyar <yboyar@google.com> am a2d47d67: Merge "Postpone accessibility events to post layout" into lmp-mr1-ub-dev

* commit 'a2d47d675a8e76625176c2b59af0468ec4612a7a':
Postpone accessibility events to post layout
006eb2ce2077b3374d2e16d44b726552a5e88bf6 09-Apr-2015 Yigit Boyar <yboyar@google.com> Fix find first/last child logic for big views

StaggeredGridLayoutManager was assuming all children all smaller
than RecyclerView when finding first/last visible children.
This is a bad assumption and breaks compatibility with swipe refresh
layout.

This CL fixes that bug and also extends unit test to cover that
case.

Previous tests was not calling the global method which is why
the issue is missed.

Bug: 19496362
Change-Id: I7fe021216af8d544318c06b80ebb51379a019102
7/widget/StaggeredGridLayoutManagerTest.java
2bf89a9bae2b6110a77cf0b3754b567bb07d12a5 09-Apr-2015 Yigit Boyar <yboyar@google.com> Postpone accessibility events to post layout

During a layout calculation, some accessibility events
might be triggered by the view system synchronously.
These events are very hard to handle for a LayoutManager
since it is in the middle of calculating a layout but
received an accessibility request while trying to
obtain / add or remove a View.

Instead, RecyclerView will silently block these calls
until the end of the layout or scroll calculation and
then dispatch content change to avoid these race
conditions.

This CL also backports more Accessibility code to support
library.

Bug: 19717689
Change-Id: I98aac9264579714352554a7e9cbd2f712a72e6ee
7/widget/BaseRecyclerViewInstrumentationTest.java
044b5b61e962367ccfc80250676eb98c86910877 26-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Inflate RV attr to create the layout manager.

Make RecyclerView more toolable. Add a custom attribute (layoutManager)
which accepts the class name of the LayoutManager to be used. The
LayoutManager specified should have a default constructor or a
constructor with the signature: (android.content.Context,
android.util.AttributeSet, int, int).

Example usage:
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
res_auto:layoutManager="LinearLayoutManager"/>

<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
res_auto:layoutManager=".CustomLayoutManager"/>

(res_auto is is the namespace prefix for
http://schemas.android.com/apk/res-auto)

Bug: 19780401
Change-Id: I46b26fce28c5b79b3a1e4321cf5c1e54ad089a5e
7/recyclerview/test/CustomLayoutManager.java
7/widget/test/RecyclerViewTest.java
7/widget/test/RecyclerViewTestActivity.java
87542e742dc991ad38966b5cd7c753f8419f1939 04-Apr-2015 Yigit Boyar <yboyar@google.com> am e4fc6108: Merge "Exclude RecyclerView children from save state" into lmp-mr1-ub-dev

* commit 'e4fc610896f3476e78a62c9b0d38f0848c7ce9df':
Exclude RecyclerView children from save state
ca570ddc976f20eae6dcc40bed9f6dee0e749353 04-Apr-2015 Yigit Boyar <yboyar@google.com> Exclude RecyclerView children from save state

This CL fixes a small bug where RecyclerView would still
call children's onSaveInstanceState although this state
was never used. Now it blocks save instance state call
similar to AdapterView.

Bug: 20061783
Change-Id: I8bed04c2e05e473957b32f4fb70587d511af0d76
7/widget/RecyclerViewBasicTest.java
a9375730dd60acc25c72c94a0e4a490e8da2ed99 30-Mar-2015 Yigit Boyar <yboyar@google.com> am 61d10279: Merge "Fix predictive animations when first item is removed" into lmp-mr1-ub-dev

* commit '61d10279f76a9f6b3fcce882bc41012d3c941db4':
Fix predictive animations when first item is removed
61d10279f76a9f6b3fcce882bc41012d3c941db4 30-Mar-2015 Yigit Boyar <yboyar@google.com> Merge "Fix predictive animations when first item is removed" into lmp-mr1-ub-dev
beb2040db39ff19448afa64b77e8be5814abd4fc 30-Mar-2015 Yigit Boyar <yboyar@google.com> am ec60a348: StaggeredGridLayoutManager gap handling bug fixes

* commit 'ec60a348ce39889a99f7ca02da94a6867bfdf66f':
StaggeredGridLayoutManager gap handling bug fixes
ec60a348ce39889a99f7ca02da94a6867bfdf66f 13-Feb-2015 Yigit Boyar <yboyar@google.com> StaggeredGridLayoutManager gap handling bug fixes

SGLM may fail to detect a gap if it is created for not having
enough items while filling towards HEAD. Although it could be
fixed by detecting the case and setting a flag, running a
full gap check at the end of a post layout seems more stable.

Bug: 18970779
Change-Id: Ie267092335ce74d315b4677af78c3adf3a98af61
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/StaggeredGridLayoutManagerTest.java
a32705f15ac5c3fd36e6503ef962c130eefb40b8 30-Mar-2015 Yigit Boyar <yboyar@google.com> am 0cdc2263: Merge "Remove a view from disappear list on recycle" into lmp-mr1-ub-dev

* commit '0cdc226349a8ed360bc3114e8f8b9da0771c6b69':
Remove a view from disappear list on recycle
b5b8cb7851590c215e695cd924c7d352ed3feac6 30-Mar-2015 Yigit Boyar <yboyar@google.com> am cde8191a: Merge "Replace new API calls w/ app compat versions" into lmp-mr1-ub-dev

* commit 'cde8191a48513f98eb7d824fe0ffcefeeb1f1d73':
Replace new API calls w/ app compat versions
0cdc226349a8ed360bc3114e8f8b9da0771c6b69 30-Mar-2015 Yigit Boyar <yboyar@google.com> Merge "Remove a view from disappear list on recycle" into lmp-mr1-ub-dev
cde8191a48513f98eb7d824fe0ffcefeeb1f1d73 30-Mar-2015 Yigit Boyar <yboyar@google.com> Merge "Replace new API calls w/ app compat versions" into lmp-mr1-ub-dev
c408cca048911aa5c8adec1cac71d83a96e13ac1 28-Mar-2015 Yigit Boyar <yboyar@google.com> am f8d4f950: am 0e05841e: resolved conflicts for merge of bcb644f8 to lmp-mr1-dev-plus-aosp

* commit 'f8d4f9500fdfd661501483884d4fc5ba18dd043e':
ISSUE-144101: change children size calculation
f3e710cfe6ee7027d5ad5b5b55fe00cff4136de8 28-Mar-2015 Yigit Boyar <yboyar@google.com> Replace new API calls w/ app compat versions

Change-Id: Ia919c67bc005360b83829fde26ae071ecd700018
7/widget/RecyclerViewAnimationsTest.java
1f5c7b76bfc3da85513e6d2c6aa1058339f0c625 26-Mar-2015 Yigit Boyar <yboyar@google.com> Fix predictive animations when first item is removed

LinearLayoutManager was not running correct animations when first
item is removed. This CL fixes that issue.

This issue was also effecting GridLayoutManager which is also
fixed in this CL.

Bug: 19945822
Change-Id: I5580106cb908d4a289a343c42d6876ce4af711ff
7/widget/GridLayoutManagerTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/LoggingItemAnimator.java
f8d4f9500fdfd661501483884d4fc5ba18dd043e 28-Mar-2015 Yigit Boyar <yboyar@google.com> am 0e05841e: resolved conflicts for merge of bcb644f8 to lmp-mr1-dev-plus-aosp

* commit '0e05841eda1ee3e3568c9ed6088709c0f9cd4f5e':
ISSUE-144101: change children size calculation
0e05841eda1ee3e3568c9ed6088709c0f9cd4f5e 28-Mar-2015 Yigit Boyar <yboyar@google.com> resolved conflicts for merge of bcb644f8 to lmp-mr1-dev-plus-aosp

Change-Id: I3646e59ebdc9f255188d71cbf2528c1945db4e8a
6a6748f8ec1d1f2824cf5c7c6ee8ade8cad0a63a 27-Mar-2015 Yigit Boyar <yboyar@google.com> Remove a view from disappear list on recycle

There was an edge case in RecyclerView where if a LayoutManager
adds a View then calls removeAndRecycle on the same view
during the same layout pass, we would recycle the view and also
try to animate disappearance. This would break the consitentcy
and trigger an IllegalStateException if View is returned from the
pool before its animation ends. Even without that race condition,
this could still break since View may come back from the pool
twice.

This CL fixes that issue by removing the View from the list
onRecycle (we were already doing it for other sets).

This CL also changes another behavior where we would cache
removedViews if they are removed in pre-layout. This is
probably why very few people were hitting the above exception.

Bug: 19935582
Change-Id: I502d7d3fdb08737e6727fd15856c90dfc41b27a8
7/widget/RecyclerViewAnimationsTest.java
7e6965e8f2c055634ce869bf78a4e4b32e4b0c1f 12-Feb-2015 Alexey Vitenko <alexei.vitenko@gmail.com> ISSUE-144101: change children size calculation

There is loss of accuracy, when users passed large span count to
GridLayoutManager's constructor.
And RecyclerView size became smaller, then users expect.

Change-Id: Id2fd03285e9bec7b2ed439f1c0ef8a3ddfcecdc4
ISSUE-144101: calculate all items borders
ISSUE-144101: optimize code
ISSUE-144101: add tests
ISSUE-144101: adjust lines size
7/widget/GridLayoutManagerTest.java
a75ca911e26945e0b326e7b70dd12378ace80270 23-Mar-2015 Dake Gu <dake@google.com> RecyclerView: fix ArrayIndexOutOfBoundException in removeAndRecycleScrapInt

App implemented onViewDetachedFromWindow() might force "AddAnimation"
stop and change internal mRecycler.mAttachedScrap list, then next loop
getScrapViewAt() may access out of bound index.

Accessing the array in reverse to avoid the problem.

Bug 19892594

Change-Id: Ie3a12c60d8135cc2cc048aa0f74f29821e5f708a
7/widget/RecyclerViewAnimationsTest.java
54693c0ed6f4bfa968f86158b2062c5688413b6c 24-Mar-2015 Dake Gu <dake@google.com> am 5fb3b3d7: Merge "RecyclerView: fix ArrayIndexOutOfBoundException in removeAndRecycleScrapInt" into lmp-mr1-ub-dev

* commit '5fb3b3d749f84f6e44065365579984a6653d5372':
RecyclerView: fix ArrayIndexOutOfBoundException in removeAndRecycleScrapInt
95ff60ba852e21922aa606b5117f6a0c4f4f33d3 23-Mar-2015 Dake Gu <dake@google.com> RecyclerView: fix ArrayIndexOutOfBoundException in removeAndRecycleScrapInt

App implemented onViewDetachedFromWindow() might force "AddAnimation"
stop and change internal mRecycler.mAttachedScrap list, then next loop
getScrapViewAt() may access out of bound index.

Accessing the array in reverse to avoid the problem.

Bug 19892594

Change-Id: Ie3a12c60d8135cc2cc048aa0f74f29821e5f708a
7/widget/RecyclerViewAnimationsTest.java
a98f32373ba3a4eb3fccf0a512b876281e77068c 18-Mar-2015 Yigit Boyar <yboyar@google.com> am 6cfe39b6: am af0d3c1e: am e1f84981: Merge "Disable predictive animations when span count changes" into lmp-mr1-ub-dev

* commit '6cfe39b6cb84efee3b455b69eef35418f6f36ed3':
Disable predictive animations when span count changes
2bf1da46d262ea61cd172ff49c9d26ec2f83fffe 18-Mar-2015 Yigit Boyar <yboyar@google.com> am 3389434e: am 3814ec82: am 2cba9043: Merge "Fix RecyclerView focus issues when target view is too big" into lmp-mr1-ub-dev

* commit '3389434ef705180f06e059a29ad70f6b810e68a5':
Fix RecyclerView focus issues when target view is too big
e1f849813f093c6ebd09428f8f022de530bc5376 18-Mar-2015 Yigit Boyar <yboyar@google.com> Merge "Disable predictive animations when span count changes" into lmp-mr1-ub-dev
2cba904324003b514001f2464891fc8818e6be0f 18-Mar-2015 Yigit Boyar <yboyar@google.com> Merge "Fix RecyclerView focus issues when target view is too big" into lmp-mr1-ub-dev
6ea3414746984e4c2c7df1e5bd7bbcb424b4a604 13-Mar-2015 Yigit Boyar <yboyar@google.com> am 23b55773: am 92e7ee57: am da50fde3: Ignore accessibility events if layout is invalid

* commit '23b55773b12cc623b64490f4215a344a85fe7c7f':
Ignore accessibility events if layout is invalid
da50fde358bd3ef2edb273b3bf0265cf5e84ec6b 12-Mar-2015 Yigit Boyar <yboyar@google.com> Ignore accessibility events if layout is invalid

This CL adds a check to AccessibilityDelegate to ignore accessibility info
requests if RecyclerView has a pending layout calculation. These callbacks
are problematic to handle in these limbo states because any custom callback
does not necessarily know whether RecyclerView could update or not.
Also, since there will be a layout calculation in near future, all these
events will arrive again.

This CL also adds a public API to query this state so that developers can
take advantage of it for custom logic (e.g. ignore click event if data is
invalid).

Bug: 19085424
Bug: 19717689
Change-Id: Ice13ed8d77657632007686bc57183f09954b8e8a
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAccessibilityTest.java
7/widget/RecyclerViewLayoutTest.java
6d109dd6676f6bca949643d2d04365494eaeb867 07-Mar-2015 Yigit Boyar <yboyar@google.com> Fix RecyclerView focus issues when target view is too big

This CL fixes a bug where if the View which asked for focus is partially
visible, we would scroll such that the invisible part of the view also
becomes visible. Unfortunately, this scroll was not capped so if view is
too big, we would scroll too much and hide the currently visible side.

Bug: 19642142
Change-Id: I408b7c8aa544cde8d4de5050e080f5431aa3cd87
7/widget/RecyclerViewLayoutTest.java
8c35ed2caf10e1b863503ae8241b703b48866fb6 26-Feb-2015 Yigit Boyar <yboyar@google.com> am 7c5081b7: am 26a012ba: am 9d3a4baa: Merge "Snap items to right when layout is RTL" into lmp-mr1-ub-dev

* commit '7c5081b741f7993af043e169852e5c9c011016e8':
Snap items to right when layout is RTL
871092be9f8b8b212a7bf16a9d1b735c3964ee9b 24-Feb-2015 Yigit Boyar <yboyar@google.com> Snap items to right when layout is RTL

In RTL mode, GridLayoutManager was aligning children to the left although
it was ordering them properly (e.g. first child on right etc).

This CL fixes the bug and aligns children to right when RTL is true and
layout is vertical.

Bug: 19445130
Change-Id: If7a7bb39a3cae419ac348003e1e1dac6b213f11e
7/widget/GridLayoutManagerTest.java
204f79ca6e0d6253c10a80da11056b03cb9d3fb0 12-Feb-2015 Yigit Boyar <yboyar@google.com> Disable predictive animations when span count changes

When span count is updated, we cannot query SpanSizeLookup
in pre-layout because it will assume it has the latest
span size. With this CL, we disable predictive animations
until span size change is applied in a layout pass.

This can be further improved by passing span size to
SpanSizeLookup#getSpanSize to support predictive
animations

Change-Id: I51373343a6fbd24442641b142d376afed28c28d9
Bug: 19356551
7/widget/GridLayoutManagerTest.java
b4c7de3f38003ea79af74330a1102557260d8555 06-Feb-2015 Yigit Boyar <yboyar@google.com> am 276ee90e: am 9a30feef: Merge "Consider decor offsets on child focus" into lmp-mr1-ub-dev

* commit '276ee90ef9038ded88be11f4853a8f2848de1fb6':
Consider decor offsets on child focus
f225a3b785fe24c31aa5f75501754b974e106859 05-Feb-2015 Yigit Boyar <yboyar@google.com> Consider decor offsets on child focus

When a child requests focus, RV tries to scroll to make it fully
visibile. Previously, it was not taking decor offsets into account
which may look buggy. This CL adds decor offsets to visibile rect.

Bug: 19247249
Change-Id: I2bb613db7437038669ecdd2aaa1ee31eeceaabb2
7/widget/RecyclerViewLayoutTest.java
7c097f33f118acb597013502d6ccebdd201280c3 03-Feb-2015 Yigit Boyar <yboyar@google.com> am 04e18b8f: am dcc9af3f: Merge "Update ChildHelper data before calling ViewGroup methods" into lmp-mr1-ub-dev

* commit '04e18b8fed4e2345aad492717667bc75afc9e4f4':
Update ChildHelper data before calling ViewGroup methods
dcc9af3f0c93d51cd8d0c694f1c0cdcd2d7ae405 03-Feb-2015 Yigit Boyar <yboyar@google.com> Merge "Update ChildHelper data before calling ViewGroup methods" into lmp-mr1-ub-dev
bb70b162c910c33b085238cc4f048df070f5eefc 30-Jan-2015 Yigit Boyar <yboyar@google.com> am 1119ebf8: am 4ef064e4: Merge "Widen the scope of ViewHolder#getAdapterPosition" into lmp-mr1-ub-dev

* commit '1119ebf8dc97296e6e6c012ed46a5c2074114cef':
Widen the scope of ViewHolder#getAdapterPosition
4ef064e4d8dd8e835d878bf0c0358dff60e46733 30-Jan-2015 Yigit Boyar <yboyar@google.com> Merge "Widen the scope of ViewHolder#getAdapterPosition" into lmp-mr1-ub-dev
619ac016831a5ad75c2e0921c9036b6f030a9e63 29-Jan-2015 Yigit Boyar <yboyar@google.com> Widen the scope of ViewHolder#getAdapterPosition

getAdapterPosition in ViewHolder needs to access RecyclerView to get
the up to date position. This does not work if developer wants to
access adapter position in onViewDetached/Recycled callbacks.

This CL adds a reference from ViewHolder to the RecyclerView for the
duration it is controlled by the RecyclerView (right before binding
from the adapter till it is passed to the RecycledViewPool).

Bug: 18960075
Change-Id: I4e310aff14f827f6289caaf2b94e61288ed3fb1a
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/TestActivity.java
31d832e5ac611b059163dc185cd84c937582a944 29-Jan-2015 Yigit Boyar <yboyar@google.com> am 7c0c870f: am ef68828a: Merge "Ignore hidden views for adapter helper" into lmp-mr1-ub-dev

* commit '7c0c870f7bde05a19820626796fd9b031025e66b':
Ignore hidden views for adapter helper
1a2a95faea3d32075b8506f13f6d6f8292db51b6 29-Jan-2015 Yigit Boyar <yboyar@google.com> Ignore hidden views for adapter helper

When adapter helper processes updates, it is important for it
whether a View is already in the UI or not. When we run
that check, we would usually check hidden views as well.

This becomes an issue if hidden view is not up to date because
it will be recycled while trying to re-use it in pre-layout.
(end animation callback will recycle it because it is not
up to date)

This CL changes AdapterHelper to ignore hidden views so that
they can continue their animation and LM will animate the rest.

Bug: 19170543
Change-Id: Ic26efd4e2a215481415131715625d785edc4f6ef
7/widget/RecyclerViewLayoutTest.java
7/widget/TestActivity.java
de5f54783555fa2e778c4ed6760472a002b2589b 21-Jan-2015 Yigit Boyar <yboyar@google.com> Update ChildHelper data before calling ViewGroup methods

ChildHelper used to change its internal data structure after calling ViewGroup.
Although this worked well for most of the time, (because we don't have any other
operation in between), it may create a problem if we receive a callback
from the ViewGroup while the item is being removed / added. In that case,
since the add/remove call did not return from ViewGroup, ChildHelper's
data will NOT match the ViewGroup's data.

This CL changes it to make sure ChildHelper updates its own data structure
before calling ViewGroup.

Bug: 18841490
Change-Id: Ia3cceb60cc207f2020c8c695b4acde7a41010b75
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/TestActivity.java
fe95a465d61d84199f48af2f7e7d193755346bf7 20-Dec-2014 Yigit Boyar <yboyar@google.com> am 2bbd043b: am a3d5bb01: SortedList data structure

* commit '2bbd043b5a96487e4a41b944b6b379e27688fe7d':
SortedList data structure
a3d5bb01bc01733999d84c452a27012c57ab369c 17-Dec-2014 Yigit Boyar <yboyar@google.com> SortedList data structure

This is a collection class that keeps items in order and dispatches
change events which makes it play nice with RecyclerView#Adapter.

It also has support for batching events so that when multiple
consecutive items are added/removed/updated in the list,
they can be dispatched to Adapter as 1 op, making it easier for
RecyclerView to handle.

Bug: 18753633
Change-Id: I86e3cce1873d8d0b310658a9b8f2f943750e9f8f
7/util/SortedListAdapterCallbackWrapperTest.java
7/util/SortedListTest.java
97bdfe39389ee7f6c48722cf68071cec9b2c3166 12-Dec-2014 Yigit Boyar <yboyar@google.com> am 9e0b95b5: am 17fd6e43: Merge "Better preserve focus on RecyclerView resize" into lmp-mr1-ub-dev

* commit '9e0b95b5a400548d326018f0dd61805fc2247d50':
Better preserve focus on RecyclerView resize
542f1260934df280985294eaef1ec8469863281f 09-Dec-2014 Yigit Boyar <yboyar@google.com> Better preserve focus on RecyclerView resize

Bug: 17980781
Change-Id: Ibccdcb3b6b4d98777996bf6e9e652ef3765486c8
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
257cba4c007caa0015502a94736636557df61992 10-Dec-2014 Yigit Boyar <yboyar@google.com> am c01c8b0a: am 6a080b0b: am eb4da62b: Merge "Don\'t stop scrolling if scroller reports 0 diff" into lmp-mr1-dev

* commit 'c01c8b0a07dfabc2cf05f1a0e0ae37ccb71e1545':
Don't stop scrolling if scroller reports 0 diff
78f659a66b021d5d0e36800a7144e956d8054cea 09-Dec-2014 Yigit Boyar <yboyar@google.com> Don't stop scrolling if scroller reports 0 diff

Bug: 18667843
Change-Id: Ie05dbc2b198ee7b5eb83bf36e9c7f01e59b5e14c
7/widget/RecyclerViewLayoutTest.java
887eee7e6d8b549d9f3e4e456d1998395df31ff7 02-Dec-2014 Yigit Boyar <yboyar@google.com> am 103eacf1: am eb0f0740: am 0c9222b8: Merge "Enable getAdapterPosition when View is rebound" into lmp-mr1-dev

* commit '103eacf1268f8e8cd84b22fd7f18d1ec54dc654b':
Enable getAdapterPosition when View is rebound
0c1ce70f08a0cc0fd76e9c511fffb3088e2ee57e 02-Dec-2014 Yigit Boyar <yboyar@google.com> am 2ba91473: am ba56f99f: am ee47f181: Merge "Remove transient views if necessary" into lmp-mr1-dev

* commit '2ba91473cd4b7c59274faaedeb12b14f84158122':
Remove transient views if necessary
0c9222b8ff65798fa394eb4df49755a34150c1d5 02-Dec-2014 Yigit Boyar <yboyar@google.com> Merge "Enable getAdapterPosition when View is rebound" into lmp-mr1-dev
ee47f181024807e43a89348198acc74f9e07ddc6 02-Dec-2014 Yigit Boyar <yboyar@google.com> Merge "Remove transient views if necessary" into lmp-mr1-dev
1a6f3a1cc4001f5f4bb98a967801e787c16686ce 02-Dec-2014 Yigit Boyar <yboyar@google.com> am 3af48c7c: am e163c30c: am 51b778e1: Merge "StaggeredGridLayoutManager gap handling bug fixes" into lmp-mr1-dev

* commit '3af48c7c9938f445b1a32ab78b079cbe1b9caaca':
StaggeredGridLayoutManager gap handling bug fixes
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
7/widget/StaggeredGridLayoutManagerTest.java
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
7/widget/BaseRecyclerViewInstrumentationTest.java
7/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
7/widget/RecyclerViewLayoutTest.java
4f1adf5a3c6b78848ee10a2377e8a1ada1ccc19a 26-Nov-2014 Yigit Boyar <yboyar@google.com> am 3d2e745f: am 4178a569: am 22829f05: Merge "Trigger on scroll callback if position changes during a layout" into lmp-mr1-dev

* commit '3d2e745f286ff9f7c48997ec5fe3bbccb5127856':
Trigger on scroll callback if position changes during a layout
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
7/widget/RecyclerViewLayoutTest.java
c83370458293477297da4b99f333e1582929c53d 25-Nov-2014 Yigit Boyar <yboyar@google.com> am 6cf5b634: am b3cd8e2c: am 9c0a9654: Merge "Fixed minor bugs in RV\'s scroll handling." into lmp-mr1-dev

* commit '6cf5b63419bfdb9413654a46cfdde239c0ad7ea2':
Fixed minor bugs in RV's scroll handling.
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
7/widget/OpReorderTest.java
7/widget/RecyclerViewLayoutTest.java
cbf7f2d3c5417293dabe2a94de38f0be2c3e9655 22-Nov-2014 Yigit Boyar <yboyar@google.com> am 935bce1a: am 78d79108: am c9ff3306: Merge "Deprecate ViewHolder#getPosition" into lmp-mr1-dev

* commit '935bce1a3a28cfc8ea46ad03a58d62f8139b28f1':
Deprecate ViewHolder#getPosition
2e5d39337c5a0e6200e48a0bfdd538ef566367f7 22-Nov-2014 Yigit Boyar <yboyar@google.com> am efbf1a28: am d21076b7: am d17ce724: Merge "Add an API to let Adapter recycle transient views" into lmp-mr1-dev

* commit 'efbf1a28a771ad68d98f7cfd3be0761b3b2a13b1':
Add an API to let Adapter recycle transient views
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
7/widget/AdapterHelperTest.java
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/GridLayoutManagerTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewBasicTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/StaggeredGridLayoutManagerTest.java
d17ce72488bb0b13b34a3684c86e48c230b6a5a4 21-Nov-2014 Yigit Boyar <yboyar@google.com> Merge "Add an API to let Adapter recycle transient views" into lmp-mr1-dev
66881c2bd0856f8bda17aff6ca69724dc4e1f4d7 19-Nov-2014 Yigit Boyar <yboyar@google.com> am 815cac0c: am 567b8e98: am 7653c810: Merge "Guard layout managers calls not to crash" into lmp-mr1-dev

* commit '815cac0c3dea421f8df7540c15a32a7cf65fcc45':
Guard layout managers calls not to crash
e2437126f0225135891544315ff72e54c7de0f59 05-Nov-2014 Yigit Boyar <yboyar@google.com> Add an API to let Adapter recycle transient views

Bug: 17783452
Change-Id: I70f2386b6f7d88e78a389a7fc1f583d0f1c45c0e
7/widget/BaseRecyclerViewInstrumentationTest.java
7/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
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewBasicTest.java
7/widget/RecyclerViewLayoutTest.java
8cf7af08ef14db0b6371586e86eb2efcbd30f2e1 14-Nov-2014 Yigit Boyar <yboyar@google.com> am 9b8c4650: am 1c3f00a0: am 33706a0b: Merge "Compute scroll offset bugfixes" into lmp-mr1-dev

* commit '9b8c465067583fde7a45264b9b3dd13a9bb23347':
Compute scroll offset bugfixes
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
7/widget/StaggeredGridLayoutManagerTest.java
5b0ca92a2949f52b73fa17140bba96df6aabd8d5 11-Nov-2014 Yigit Boyar <yboyar@google.com> am d41a810a: am f6f29aaa: Merge "DO NOT MERGE Don\'t limit lookup size w/ adapter size" into lmp-dev

* commit 'd41a810affc84a47ea7b498e7fbefafddcb4d8a3':
DO NOT MERGE Don't limit lookup size w/ adapter size
f6f29aaac8ac66321d751380ae0620d4f2b684f9 11-Nov-2014 Yigit Boyar <yboyar@google.com> Merge "DO NOT MERGE Don't limit lookup size w/ adapter size" into lmp-dev
c546ca2a483b19e357ab55a8d739ba6004312025 11-Nov-2014 Yigit Boyar <yboyar@google.com> Merge "DO NOT MERGE Check for notifyDataSetChanged calls when processing adapter" into lmp-dev
7a072b2df14a1ca9671ad5d5103fc1dacc3e4bff 11-Nov-2014 Yigit Boyar <yboyar@google.com> Merge "DO NOT MERGE Fix default item animator to end animations properly" into lmp-dev
7fe361d61cc913e2a42b6ff0ef86d20bf40aba4f 04-Nov-2014 Yigit Boyar <yboyar@google.com> DO NOT MERGE 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
(cherry picked from commit 52a47709e5ce81321bfa56b7595731a8e6835ef6)
7/widget/StaggeredGridLayoutManagerTest.java
cf8c77256c4d7079099d506a03af2f1c25b0ce7b 03-Nov-2014 Yigit Boyar <yboyar@google.com> DO NOT MERGE Check for notifyDataSetChanged calls when processing adapter

Bug: 18182313
Bug: 18208149
Change-Id: I34013523b6b47ba3859ebb1bafa3ee433b51c75f
(cherry picked from commit 17d560c4a247dbfb795a2ea838c819cda77e5fa7)
7/widget/RecyclerViewAnimationsTest.java
0771a068bc50c8e24e52af018964eb3716498626 01-Nov-2014 Yigit Boyar <yboyar@google.com> DO NOT MERGE Fix default item animator to end animations properly

This change also adds more test cases to avoid similar issues.

Bug: 18182313
Change-Id: I7b6e965ad0f70033d0e685d41238d9225372d143
(cherry picked from commit 9457c0c167cca5aafe971fb2eb75f4a43c07ec05)
7/widget/DefaultItemAnimatorTest.java
c110be5ead608d60a4e30307c46f51205ca51b10 03-Oct-2014 Yigit Boyar <yboyar@google.com> DO NOT MERGE Fix RV's onViewAttached/detached callbacks

This change also fixes a bug in DefaultItemAnimator.

Bug: 17599182
Bug: 17881182
Change-Id: I4adadeb5d2d7d5aaef0f253eac52d2624de73d5e
(cherry picked from commit 90ca3086dbf66ad6bb8840e46ec8524a705e1c18)
7/widget/AdapterHelperTest.java
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/StaggeredGridLayoutManagerTest.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
7/widget/GridLayoutManagerTest.java
7/widget/StaggeredGridLayoutManagerTest.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
7/widget/StaggeredGridLayoutManagerTest.java
17d560c4a247dbfb795a2ea838c819cda77e5fa7 03-Nov-2014 Yigit Boyar <yboyar@google.com> Check for notifyDataSetChanged calls when processing adapter

Bug: 18182313
Bug: 18208149
Change-Id: I34013523b6b47ba3859ebb1bafa3ee433b51c75f
7/widget/RecyclerViewAnimationsTest.java
9457c0c167cca5aafe971fb2eb75f4a43c07ec05 01-Nov-2014 Yigit Boyar <yboyar@google.com> Fix default item animator to end animations properly

This change also adds more test cases to avoid similar issues.

Bug: 18182313
Change-Id: I7b6e965ad0f70033d0e685d41238d9225372d143
7/widget/DefaultItemAnimatorTest.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
7/widget/AdapterHelperTest.java
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/StaggeredGridLayoutManagerTest.java
824a7db96feacf3b68f56993ed72712bc935153e 14-Oct-2014 Yigit Boyar <yboyar@google.com> RecyclerView should call correct adapter on swap

Bug: 17687329
Change-Id: I35bc785e6c64d1fd0844286766e8ddb59d061737
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewLayoutTest.java
ca9ce7ccdccf6b6a2a81da73dd1e6425d90e4b23 30-Sep-2014 Yigit Boyar <yboyar@google.com> Assign View spans before they are measured

Bug: 17706218
Change-Id: I349b9a1918825ff6c45079f7617cf499c90c3cd1
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/StaggeredGridLayoutManagerTest.java
bb6ebab3b3b85ec20b3bc262289a2460705322f5 25-Sep-2014 Yigit Boyar <yboyar@google.com> Set scroll state when stop scroll is called

Bug: 17644072

Change-Id: Iac0b0cff4ee06b461cebb6e933a5a712a06a7a4e
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewBasicTest.java
7/widget/RecyclerViewLayoutTest.java
afa0494a97687b705feb3659385578f33f697ea9 15-Sep-2014 Yigit Boyar <yboyar@google.com> Fix GridLayoutManager's measurement bug

GridLayoutManager was not re-measuring shorter children when they are
resized to the size of tallest child.

Bug: 17487208
Change-Id: Iccd28cf29e27ceda3105259cb6e33e695a44926d
7/widget/GridLayoutManagerTest.java
4b9b4d3fca81486051bac9aadb73d8865948c3bf 12-Sep-2014 Yigit Boyar <yboyar@google.com> More adapter helper tests and bugfixes

Move operations are harder to handle because they break
continuity. With this change, AdapterHelper will first
reorder ops to push them to the end of the list then
process as usual.

Bug: 17457999
Change-Id: Ifb95264adf75a59b81fcab02269047681a26333c
7/widget/AdapterHelperTest.java
7/widget/OpReorderTest.java
e4fde6825bba479c9b030feb8f810694d46b2f06 11-Sep-2014 Yigit Boyar <yboyar@google.com> Fix how adapter helper handles update ops

Bug: 17457999
Change-Id: Id0bb13d7d20e559d233f9a855d996439fb7982c2
7/widget/AdapterHelperTest.java
a910619e83d0052e1d81aa5fe532821a2f99d76c 09-Sep-2014 Yigit Boyar <yboyar@google.com> Add a11y support for RecyclerView

Bug: 17411052
Change-Id: I9ef93f0bb072e190d6017ee991e6d2c0ab119a62
7/widget/AdapterHelperTest.java
7/widget/GridLayoutManagerTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewAccessibilityTest.java
7/widget/StaggeredGridLayoutManagerTest.java
245b9720dad47a694d16a1d0f48ad462bc27989f 28-Aug-2014 Yigit Boyar <yboyar@google.com> Fix failing RecyclerView unit tests

This CL fixes a bug in AdapterHelper unit test and also
fixes a bug in LinearLayoutManager where stack from end
was not handled properly.

Bug: 17310313
Change-Id: I4da8be0145f901de29a4baea6df97d226c471302
7/widget/AdapterHelperTest.java
7/widget/LinearLayoutManagerTest.java
061c3284cf284424ae084799dd7ba5c8d6d59faa 01-Sep-2014 Yigit Boyar <yboyar@google.com> Fix GridLayoutManager's reverse scroll

This change also fixes a bug where GridLayoutManager was not
respecting the size in LayoutParams (in scroll direction).

Bug: 17338285
Change-Id: I80f5fdd7c46f4ed2c7357f89c3556b0a7ed59d85
7/widget/GridLayoutManagerTest.java
0ec96558f829719283bb1a49ff218c3ce1430626 28-Aug-2014 Yigit Boyar <yboyar@google.com> End all animations when RV is detached

Bug: 17307859
Change-Id: Ia213d52ab79f8c80bdfb5321e7a726876b8554a2
7/widget/RecyclerViewAnimationsTest.java
42c4af4ff383daf001263ae18a9b00b9fbf87487 23-Aug-2014 Yigit Boyar <yboyar@google.com> Clean old positions for unused scrap views

Bug: 17144600
Change-Id: I810edc10d110b9473e2bb5a2ce80d193359c1133
7/widget/GridLayoutManagerTest.java
7/widget/RecyclerViewAnimationsTest.java
48465069f050ebcecd6142a8741af2d0fcdae4dc 20-Aug-2014 Yigit Boyar <yboyar@google.com> Merge "Add predictive animation support to GridLM" into lmp-dev
93d88283955af6643f2ea0f3cc6cbc34ea49f181 18-Aug-2014 Yigit Boyar <yboyar@google.com> Recycle a view if it is added then removed instantly

Bug: 17096150
Change-Id: I6115512f71598f88fdc631ff50f7a1c4f7dc4481
7/widget/RecyclerViewAnimationsTest.java
9ace89f49ed497e649b127beb12b8a237e5d30e7 16-Aug-2014 Yigit Boyar <yboyar@google.com> Add predictive animation support to GridLM

Bug: 16847853
Change-Id: Ibeda5c5efda7b87d387cbc1b56c766fca5e3bf3a
7/widget/GridLayoutManagerTest.java
73304eff156157f62075215e795e774803a6f96a 15-Aug-2014 Yigit Boyar <yboyar@google.com> Span calculation bugfix for GridLM

This build also adds a sanity check to layout method to verify item's span count
and throw an exception if item does not fit to Grid.

Bug: 17064017
Change-Id: I6794ed04c7ccedb839e03a75c98c3949a959eb8c
7/widget/GridLayoutManagerTest.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
7/widget/AdapterHelperTest.java
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/StaggeredGridLayoutManagerTest.java
d7e2f2ab1d253133fa54f309e74a7ee384c33971 08-Aug-2014 Yigit Boyar <yboyar@google.com> Bugfixes for StaggeredGridLayoutManager

Bug: 16678349
Bug: 16403163
Bug: 16734653

Change-Id: If78aa7ec4a09860ccca698bcb851dff5e5db5ae7
7/widget/AdapterHelperTest.java
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/StaggeredGridLayoutManagerTest.java
d18ad0e2b5268420e252382f3524d535826aae6e 14-Aug-2014 Yigit Boyar <yboyar@google.com> Merge "Check all pending animation groups in DefaultItemAnimator#isRunning" into lmp-dev
047e1151b1ce6965f5578eac83ee1ac3cf524ba7 13-Aug-2014 Yigit Boyar <yboyar@google.com> Check all pending animation groups in DefaultItemAnimator#isRunning

I also added a test case class for DefaultItemAnimator

Bug: 16958409
Change-Id: Id410890d146afeb953e934358e9c2ba12c14bc07
7/widget/DefaultItemAnimatorTest.java
f485be9def4c0f72cfdfa6b0c616c23f04652817 13-Aug-2014 Yigit Boyar <yboyar@google.com> Ignored views should be ignored by getViewForPosition

Bug: 16950247
Change-Id: I3940ce3b049a3ae718706c503b0404f3fda43ffd
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewBasicTest.java
7/widget/RecyclerViewLayoutTest.java
4d0ec6f430fd1e0228e5465a7973f50438bf2949 08-Aug-2014 Yigit Boyar <yboyar@google.com> Merge "Provide an API to map pre-layout positions to adapter" into lmp-dev
4bacf13ec17763ba2e2d049d32a4a1dcca77a433 07-Aug-2014 Yigit Boyar <yboyar@google.com> Provide an API to map pre-layout positions to adapter

This CL also fixes a bug in AdapterHelper where it was not handling
it properly when a moved item is removed at the same layout pass.

Bug: 16192614
Bug: 16823251
Change-Id: I30e66e75a85f0396381c9a4f1dea8bf20655e4bc
7/widget/AdapterHelperTest.java
c6f82b1e233c11ce3130325430be93ea018ba7f1 08-Aug-2014 Yigit Boyar <yboyar@google.com> Merge "Dont save config parameters in saved state" into lmp-dev
16e5adf5416248d97f2aeaa9d5e17bb5093130eb 06-Aug-2014 Yigit Boyar <yboyar@google.com> Dispatch adapter updates before ViewHolders are updated

Previously, AdapterHelper was dispatching update ops after calling the callback
to update ViewHolders. In that case, if LayoutManager wants to compare its
ViewHolders with the dispatched event, ViewHolder would return the wrong position
since it has already been updated according to the update op.

Bug: 16840245
Change-Id: I77dee13ed2ca0afa975cdbc7a0fbd1b49811a31d
7/widget/AdapterHelperTest.java
b8403301bbec29129730f6cce3fe2fa3ee8e1e0b 06-Aug-2014 Yigit Boyar <yboyar@google.com> Dont save config parameters in saved state

Bug: 16822490
Change-Id: I2c652bf96f583443ab6402969d3fedf652b9ec04
7/widget/LinearLayoutManagerTest.java
7/widget/StaggeredGridLayoutManagerTest.java
b97e8219784e623526bc3c6077a698d608f04fd9 05-Aug-2014 Yigit Boyar <yboyar@google.com> Added simple GridLayoutManager

Bug: 16678349
Bug: 16734653
Bug: 16661383

Change-Id: I29a74bdffa9386831faab191f1c3d268743dbf6d
7/widget/LinearLayoutManagerTest.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
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
6b4d950d0d1e26165a1e643a2fd1fe4e283786f1 31-Jul-2014 Yigit Boyar <yboyar@google.com> Fix StaggeredGrid crash: Saving state of an emty Span

Bug:16644724
Change-Id: Id0567d6f3dc7ab8621774fe147ab0dc8c5b98e61
7/widget/RecyclerViewLayoutTest.java
7/widget/StaggeredGridLayoutManagerTest.java
6e83751247c5be0211d7bffaf057431c03dfef38 25-Jul-2014 Yigit Boyar <yboyar@google.com> LayoutManagers should not jump to position in pre-layout

Bug: 16550277
Change-Id: I60335e4994309e53311e95c890a4934edead70f0
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/StaggeredGridLayoutManagerTest.java
66a5670ac0e58e1d08f6af57b13648c1ab9df441 26-Jul-2014 Yigit Boyar <yboyar@google.com> Change public recyclerview to unscrap views

Bug: 16201361
Bug: 15910842
Change-Id: I5453f9ed33c88c5a0d92f617a4f57cf938be4ec0
7/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
7/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
7/widget/RecyclerViewLayoutTest.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
7/widget/RecyclerViewAnimationsTest.java
5cfed5428d421f179f83382ad72ec6edd11a066d 23-Jul-2014 Yigit Boyar <yboyar@google.com> Update state on onMeasure call in RecyclerView

Bug: 16187385

Change-Id: Ifee446c47d49536327f34233a853929c6cf2a196
7/widget/RecyclerViewLayoutTest.java
0b1059b711009601ff08354e2df6bfc45266e80a 21-Jul-2014 Yigit Boyar <yboyar@google.com> Add swapAdapter method to RecyclerView

Bug: 16315373
Change-Id: Ia790aff458d2ca61ec403dd9887d9758eb74f47a
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewLayoutTest.java
a5cfdf6e647d34c66b7df8688cb35d9a3b7b24a0 19-Jul-2014 Yigit Boyar <yboyar@google.com> Merge "RecyclerView should skip ignored children in mass recycle" into lmp-dev
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
7/widget/StaggeredGridLayoutManagerTest.java
1faed0c7c20fc3a0b7befabbac1beac1019effc7 10-Jul-2014 Yigit Boyar <yboyar@google.com> Add move operation to RecyclerView adapter

Bug: 16127440

Change-Id: Iefd305e714a4bc6dad5f071dfba92aa5c5af8ca3
7/widget/AdapterHelperTest.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
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewAnimationsTest.java
6e560171b774afafd572b1896becac7b308a92e6 16-Jul-2014 Yigit Boyar <yboyar@google.com> RecyclerView should skip ignored children in mass recycle

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

Bug: 16210009
Change-Id: Id4cdf1ef87aaa52581009b651690abbf90ad4522
7/widget/RecyclerViewLayoutTest.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
7/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
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/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
7/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
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/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
7/widget/RecyclerViewLayoutTest.java
49c83b12201dde5b93d4eca3d44478e0c967a2e6 26-Jun-2014 Yigit Boyar <yboyar@google.com> Pass recycler to LayoutManager#onDetach callback

Bug:15736907
Change-Id: I6cd50800ebae0ff10b99665fcda77b0da411065c
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/StaggeredGridLayoutManagerTest.java
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
7/widget/StaggeredGridLayoutManagerTest.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
7/widget/BucketTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewLayoutTest.java
2d2e8d88103866b631eb0f3805da137ebcfb0275 23-May-2014 Yigit Boyar <yboyar@google.com> StaggeredGridLayoutManager for recycler view

Change-Id: Ie5466806aa0428a9f9f2b9eb6b85dbcfbbaebe5f
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/StaggeredGridLayoutManagerTest.java
fe3996cf5af65fe11cc3ed47b67123ec267bd336 18-Jun-2014 Yigit Boyar <yboyar@google.com> Do not scrap invalidated views in RecyclerView

Bug: 15703871
Change-Id: Ib765ddd2ea5b5d897879f2387e8ae6a9f98e555e
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewLayoutTest.java
94c0b086c12e634976fecd47d442bc7a1a6341bb 17-Jun-2014 Yigit Boyar <yboyar@google.com> LLM cleanup

Change-Id: Ib4c9571855dc9a0be6bc5931536e37ff686f5c7d
7/widget/LinearLayoutManagerTest.java
c17b4da9ebfac1c9c18237cf10b1e63d9337f62b 18-Jun-2014 Yigit Boyar <yboyar@google.com> Merge "Disable RecyclerViewAnimations on notifyDataSetChanged"
b7b44e5454dc409934bcc5609b81d1715c984d40 14-Jun-2014 Yigit Boyar <yboyar@google.com> Disable RecyclerViewAnimations on notifyDataSetChanged

Bug: 15618007
Bug: 15615904
Change-Id: I429847428df00fe334552378e489d92c78d8555b
7/widget/RecyclerViewAnimationsTest.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
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewLayoutTest.java
7a1d7693cfd4d0df5a044a5b5817a750a8b7c1b4 17-Jun-2014 Yigit Boyar <yboyar@google.com> Merge "Check view type before re-binding ViewHolders in RecyclerView"
aeb27f42f502f1687a7047bc34deeff17b874287 16-Jun-2014 Yigit Boyar <yboyar@google.com> Fixed LinearLayoutManager unit tests which end prematurely

Change-Id: Icc4b45df767597552771403661bb6ed2ce65816d
7/widget/LinearLayoutManagerTest.java
7e9da1a2629b657d56e2f54abd18c6249f3be037 14-Jun-2014 Yigit Boyar <yboyar@google.com> Check view type before re-binding ViewHolders in RecyclerView

Bug: 15596672
Change-Id: Ia42700e400b98b1020dbbba282d383da14d5816c
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewLayoutTest.java
22b6b8163d2e15eb6d0a89906854dec801945f1d 13-Jun-2014 Yigit Boyar <yboyar@google.com> RecyclerView: Fix type-check bug for cached views

Change-Id: I1b6d33d7e1aeeb36e697cb95cd7109a9ac53a909
7/widget/BaseRecyclerViewInstrumentationTest.java
7/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
7/widget/AdapterHelperTest.java
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewLayoutTest.java
75b7ff9ccca9311854e9c74282b1af1ce87df470 04-Jun-2014 Yigit Boyar <yboyar@google.com> LinearLayoutManager scrollToPosition after restore bugfix

Bug: 14271688
Change-Id: I8cefac46ed575e748a78b3a6071bb886c00f07ea
7/widget/LinearLayoutManagerTest.java
c35968d173f900d8024bdf38174e2225c9a7f311 28-May-2014 Chet Haase <chet@google.com> Enable simple automatic item animations for RecyclerView

RecyclerView now has automatic animations for add/remove operations requiring
no changes from LayoutManagers. This approach, which is enabled by RecyclerView
having a non-null ItemAnimator (the default behavior) and LayoutManager returning
false for supportsPredictiveItemAnimations() (the default behavior), enables
LayoutManagers to run normally, with only one layout pass and requiring no extra
logic to predict placement of appearing or disappearing items. Appearing
and disappearing items will simply be faded in/out, since the RecyclerView lacks
the knowledge or where to animate the views from/to.

Issue #15542012 Simplify RecyclerView animations

Change-Id: I6219210c9b0ca32535182c1d233076a355fe0671
7/widget/RecyclerViewAnimationsTest.java
d3f1c99a290de13631f9635e06444f75344967d2 03-Jun-2014 Yigit Boyar <yboyar@google.com> Flush item updates before scroll in RecyclerView

Bug: 15350129
Change-Id: Ia759eee95a2158df3835a283ad7d44841d699c3b
7/widget/RecyclerViewAnimationsTest.java
11b7cfea15306c0d6e4ed7da09f7698df01695df 03-Jun-2014 Yigit Boyar <yboyar@google.com> Fixed RecyclerView scrap matching bug

Bug: 15386994
Change-Id: If742678f83363b20f4e461060bd081ead0f07bf6
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
8edcb0bdeaba6931f9d8154f0c81f57da7ddab2a 31-May-2014 Yigit Boyar <yboyar@google.com> Fix SavedState bugs in LinearLayoutManager

Bug: 15343782, 14271688
Change-Id: Idbd23ce08b51746ccc17d3f2a81a6ed8349bd45c
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/LinearLayoutManagerTest.java
d7848507d6c561ca8e17d1954653f4fd26b58f84 30-May-2014 Yigit Boyar <yboyar@google.com> Added first/lastVisible methods to LinearLayoutManager

Bug: 13909619
Change-Id: I947c3cd018afa2a8d387d6cbc87e03b566ee5392
7/widget/LinearLayoutManagerTest.java
888c70abaa77e15458c366b8d27835d176dcc546 30-May-2014 Yigit Boyar <yboyar@google.com> Invalidate RecyclerView on scrap cleanup

Bug: 15331930
Change-Id: I3bee951201342f6a30764db3c766308e00a4383d
7/widget/RecyclerViewAnimationsTest.java
d4a794983364c7b1801638abc7f332abee12b6e6 28-May-2014 Yigit Boyar <yboyar@google.com> RecyclerView Cleanup

Removed deprecated methods from RecyclerView.

(cherry picked from commit 34106bc044343fdac6d16623166d17cda17c083e)

Change-Id: Ie9de0aae4519b870302424deaf2326cbf9e4b7fc
7/widget/RecyclerViewBasicTest.java
b5f8b4fecb531aee6b359b4968409410aba90817 17-May-2014 Yigit Boyar <yboyar@google.com> Full animation support for LinearLayoutManager

Change-Id: Ie3b265a9f880d68746d1bd193d787f34ea8d0045
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewBasicTest.java
7/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
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewBasicTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/RecyclerViewTest.java
7/widget/TestActivity.java
bde2d5e79f929ce8c54de29c8389695b4d4e9c25 15-May-2014 Chet Haase <chet@google.com> Revert "Remove adapter access from layout manager"

This reverts commit 15a9db9177a871c7b1cd65b8923beac1b9b75174.

Change-Id: Ia80ac4f093c49145a6a2c09d1ea4f9102b195f40
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewBasicTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/RecyclerViewTest.java
7/widget/TestActivity.java
15a9db9177a871c7b1cd65b8923beac1b9b75174 06-May-2014 Yigit Boyar <yboyar@google.com> Remove adapter access from layout manager

Change-Id: I33a48528e3290fa78aaa67237f3b098e010e09d9
7/widget/BaseRecyclerViewInstrumentationTest.java
7/widget/RecyclerViewAnimationsTest.java
7/widget/RecyclerViewBasicTest.java
7/widget/RecyclerViewLayoutTest.java
7/widget/RecyclerViewTest.java
7/widget/TestActivity.java
c30b4fceb76f45348c20f8b15096e1e13ff0c42f 29-Apr-2014 Yigit Boyar <yboyar@google.com> Fix RecyclerView save instance state bug

Bug: 14351525
Change-Id: I633f073151c4bcbf8b4c24e16d0737aba9e3e3bd
7/widget/RecyclerViewTest.java
edc25dd683986a905790b0e9ef124165b6dd8004 24-Apr-2014 Yigit Boyar <yboyar@google.com> RecyclerView testing

Added RecyclerView to gradle settings
Setup recyclerview project to run tests
Added simple tests for RecyclerView to serve as a baseline for future tests

Change-Id: Ibaf3edc048a573ac53bd453e4346041e621badee
7/widget/RecyclerViewTest.java