History log of /frameworks/support/v17/tests/src/android/support/v17/leanback/widget/GridTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/tests/src/android/support/v17/leanback/widget/GridTest.java