History log of /frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/OnChildLaidOutListener.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a00bada00bff4a58436a39472ab14ccb7a8f619d 31-Mar-2015 Craig Stout <cstout@google.com> Javadoc polish.

Includes new package level javadoc for:
android.support.v17.leanback
android.support.v17.leanback.app
android.support.v17.leanback.widget

b/19007191

Change-Id: Id1e5d55eabbf37c0420e6e4c73abe3d4f1aabee1
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/OnChildLaidOutListener.java
d586ba8825b418d9589436725bfdead30f0dc075 28-Jan-2015 Dake Gu <dake@google.com> Reduce memory consumption of DPAD scroll multiple column grid

Created a special SmoothScroller to handle onFocusSearchFailed
for multiple column cases. It remembers the pending movements caused
in onFocusSearchFailed and consume the pending DPAD movements when
a view is laid out in the direction. The change avoids appending
or prepending excessive views on the scroll direction which is not
within screen bounds.

Add a onLaidOut() listener for VerticalGridFragment to check if
we hit the first row. If the grid is three columns.
Previously (before introducing the special SmoothScroller) we always
prepend one row of items before fire onSelected event, so when we fire
onSelected(1), item0 is already in the tree and havePreviousViewInSameRow()
returns false. Using the special SmoothScroller, onSelected is fired at
the time a view is created. Checking hasPreviousViewInSameRow() at the
time item1 is selected will return true because item0 has not been
created yet. So VerticalGridFragment should also listen to when
item0 is added to hierarchy.

Applied a MAX_PENDING_MOVES to avoid overscroll too much.

Issue: 19150678

Change-Id: I7cf0093a4bee652f60c5f2004b799ee7c3f87fc8
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/OnChildLaidOutListener.java