ef4e1b371215f9fffa9245159250740b611dfb4d |
|
01-Aug-2016 |
Dake Gu <dake@google.com> |
leanback: use android attr vertical/horizontalSpacing Follow the name convension of android, call the space between grid item "verticalSpacing" and "horizontalSpacing". Deprecate the old customized attribute verticalMargin and horizontalMargin. Change-Id: Id5a1efdb9ce2f1062abd62d501869d2b0310a5c9
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|
c9a859537b0871f84afeeb706a5b425fe3f2b4dd |
|
25-May-2016 |
Aurimas Liutikas <aurimas@google.com> |
Fix a random assortment of spelling errors. Fix spelling errors found by Android Studio. Change-Id: I121c79029f4e323da4ff2f44891e25480c44ebbc
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|
8c5d3b45f6afa838e64e4cf011a385c191d557c6 |
|
04-Mar-2015 |
Dake Gu <dake@google.com> |
GridLayoutManager: fix crash and support scroll delta. Fix crash of setSelectedPosition. Add scroll delta that applied to setSelectedPosition. Moved updateFirstVisibleOffset into StaggeredGrid class, the offset is now calculated when inserting first visible item, because the offset is needed when we append next visible item. Fixed a loop variable bug in updateFirstVisibleOffset. Added test cases Bug 19272838 Bug 19593908 Change-Id: Ibb6f2e115e9e4af6a2b18a48a921e6766cd0c0a6
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|
89fac6fa5d32123cc79d1d4127a4a7bcf86c498a |
|
29-Jan-2015 |
Dake Gu <dake@google.com> |
StaggeredGridDefault: Fix inconsistent algorithm results appendVisibleItemsWithoutCache() uses inconsistent judgements to determin whether to fill item on next row. When filling first item on a row, it does not use margin; when filling next item on a row, it uses margin. This may cause different layout results in two situations: itemN and itemN+1 are filled in one pass or two passes (if itemN hits uplimit in first pass). The CL make it consistent that it does not take margin into consideration in deciding whether to fill second item on next row. This bug is easier to reproduce after adding LinearSmoothScroller support for DPAD navigating a multiple row Grid. Previously appendOneColumn is used to handle focusSearchFailed, where it always fills one column so that itemN and itemN+1 are guaranteed to be filled in single pass. Added test case. Bug: 19196818 Change-Id: I9e829bff62feb9ab651bb81bf41638f799bf3a5d
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|
85df3117f0fcd0aa10d7bd45194dab97e22112f2 |
|
14-Jan-2015 |
Dake Gu <dake@google.com> |
Fixed three bugs causing redundant remove and append 1. When checking overlimit, should take margin into consideration. 2. Fixed a bug in findRowMax, should only use edge of last item in that row. 3. appendItems should check overlimit before add item when oneColumnMode is false, both withcache and withoutcache. Also added test case for move items Bug: 19017080 Change-Id: I6594c9158b186449739eb284c4607df7803e2049
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|
3e534fdedcd360d1dd5bcc51661d93f71e57b31e |
|
10-Jan-2015 |
Dake Gu <dake@google.com> |
Fix wrong grid layout caused by not initialized offset. When we append non-cached items to grid, the first visible item created has a offset of 0. Then we prepend items with cache, which will put the first prepended item at the same location of current first visible item. Bug 18963829 Change-Id: I174c995ff05acc8492c938bb67a7d4b993629272
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|
6e96b9d46e7af6bedf6213ecc2ba0ad7b8050778 |
|
18-Dec-2014 |
Dake Gu <dake@google.com> |
Refactoring grid algorithm The current interface between GridLayoutManager and StaggeredGrid is too complicated: GridLayoutManager updates rows min/max edge and Grid is responsible for fill items according to row min/max edge. This CL moved most of the grid code into Grid class family and make interface between GridLayoutManager and Grid much simpler. GridLayoutManager no longer updates row min/max. Refactoring made it possible to write efficient Grid class for single row or non staggered grid. A base Grid class is abstracted out. StaggeredGrid implemented it using a complicated data strurcture (a CircularArray) to cache stagger layout result. A single row Grid will cost less memory allocations: a TODO in the near future. fastRelayout() was rewriten slightly differently, it will relayout (using detachFromParent and attachToParent) next children once detects child size change, previously we push children away on the same row which might cause a bad alignment at end. Regular layout now starts with detachAndScrapAttachedViews(), this is lighter than removeAndRecycleAllViews() which may lose some views due to cache limit. Prepend/append during scroll now also detects if child size changed, then invalidate cached staggered result before/after the child. Improvement during adapter notifyChange or structure change, now we no longer discard grid information in a non-fast relayout case. We still keeps the same cached staggered result, until we really find size of a child has changed then we invalidate part of the cache. Tested with BrowseFragment/HorizontalGridTestActivity/ VerticalGridActivity/BrowseAnimationActivity and with rtl=true/false. Issue: 18946733 Change-Id: Ia0cfa34ad8d09c124dbffe51680a89f177bfef31
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|
e0e66a21916f94ebbced0d1ffe3dc652c9c7a15e |
|
10-Dec-2014 |
Kris Giesing <kgiesing@google.com> |
Fix various RTL issues related to multi-row grid views Also fix some RTL issues related to grid views that do not wrap content b/18631342 Change-Id: Ibc52057375c24409dacd7af3fb1e487d022b9ff8
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|
8b068ddbbf22a246eab49ec25a2f7c3abfbdca51 |
|
16-Mar-2014 |
Tim Kilbourn <tkilbourn@google.com> |
Add a .readme file to be copied into the sdk src. This allows the project resources to be built by ant/eclipse. Also moved default source code dir to src instead of java/src. Change-Id: I9e5002fbbfb96b98be772c1ec6653322d5563b56
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/StaggeredGridDefault.java
|