[TMP] BetterLinearLayoutManager: debug initial anchor
Change-Id: I81e5df345c14ab345a2fd1f7494e7f680d6889d4
This commit is contained in:
parent
e6a7e05a92
commit
6f58df75f3
|
@ -43,6 +43,8 @@ import static androidx.recyclerview.widget.RecyclerView.VERTICAL;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import timber.log.Timber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link RecyclerView.LayoutManager} implementation which provides
|
* A {@link RecyclerView.LayoutManager} implementation which provides
|
||||||
* similar functionality to {@link android.widget.ListView}.
|
* similar functionality to {@link android.widget.ListView}.
|
||||||
|
@ -911,6 +913,7 @@ public class BetterLinearLayoutManager extends LinearLayoutManager implements
|
||||||
final int boundsStart = mOrientationHelper.getStartAfterPadding();
|
final int boundsStart = mOrientationHelper.getStartAfterPadding();
|
||||||
final int boundsEnd = mOrientationHelper.getEndAfterPadding();
|
final int boundsEnd = mOrientationHelper.getEndAfterPadding();
|
||||||
anchorInfo.mCoordinate = (int) ((boundsEnd - boundsStart) * mPreferredAnchorPlacement);
|
anchorInfo.mCoordinate = (int) ((boundsEnd - boundsStart) * mPreferredAnchorPlacement);
|
||||||
|
Timber.i("Set preferred anchor to " + mPreferredAnchorPosition + " - " + anchorInfo.mCoordinate);
|
||||||
|
|
||||||
// If all visible views are removed in 1 pass, reference child might be out of bounds.
|
// If all visible views are removed in 1 pass, reference child might be out of bounds.
|
||||||
// If that is the case, offset it back to 0 so that we use these pre-layout children.
|
// If that is the case, offset it back to 0 so that we use these pre-layout children.
|
||||||
|
|
Loading…
Reference in New Issue