Searched refs:snapTarget (Results 1 – 5 of 5) sorted by relevance
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/ |
D | DividerSnapAlgorithm.java | 414 public SnapTarget getNextTarget(SnapTarget snapTarget) { in getNextTarget() argument 415 int index = mTargets.indexOf(snapTarget); in getNextTarget() 419 return snapTarget; in getNextTarget() 422 public SnapTarget getPreviousTarget(SnapTarget snapTarget) { in getPreviousTarget() argument 423 int index = mTargets.indexOf(snapTarget); in getPreviousTarget() 427 return snapTarget; in getPreviousTarget() 457 public SnapTarget cycleNonDismissTarget(SnapTarget snapTarget, int increment) { in cycleNonDismissTarget() argument 458 int index = mTargets.indexOf(snapTarget); in cycleNonDismissTarget() 470 return snapTarget; in cycleNonDismissTarget()
|
D | SplitLayout.java | 518 final DividerSnapAlgorithm.SnapTarget snapTarget = mDividerSnapAlgorithm.findSnapTarget( in setDivideRatio() local 521 setDividerPosition(snapTarget != null in setDivideRatio() 522 ? snapTarget.position in setDivideRatio() 552 public void snapToTarget(int currentPosition, DividerSnapAlgorithm.SnapTarget snapTarget) { in snapToTarget() argument 553 switch (snapTarget.snapPosition) { in snapToTarget() 555 flingDividerPosition(currentPosition, snapTarget.position, FLING_RESIZE_DURATION, in snapToTarget() 560 flingDividerPosition(currentPosition, snapTarget.position, FLING_RESIZE_DURATION, in snapToTarget() 565 flingDividerPosition(currentPosition, snapTarget.position, FLING_RESIZE_DURATION, in snapToTarget() 566 … () -> setDividerPosition(snapTarget.position, true /* applyLayoutChange */)); in snapToTarget()
|
D | DividerView.java | 372 final DividerSnapAlgorithm.SnapTarget snapTarget = in onTouch() local 374 mSplitLayout.snapToTarget(position, snapTarget); in onTouch()
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/ |
D | SplitLayoutTests.java | 153 DividerSnapAlgorithm.SnapTarget snapTarget = getSnapTarget(0 /* position */, in testSnapToDismissStart() local 156 mSplitLayout.snapToTarget(mSplitLayout.getDividerPosition(), snapTarget); in testSnapToDismissStart() local 165 DividerSnapAlgorithm.SnapTarget snapTarget = getSnapTarget(0 /* position */, in testSnapToDismissEnd() local 168 mSplitLayout.snapToTarget(mSplitLayout.getDividerPosition(), snapTarget); in testSnapToDismissEnd() local
|
/frameworks/base/packages/CredentialManager/horologist/src/com/google/android/horologist/compose/rotaryinput/ |
D | Rotary.kt | 633 private var snapTarget: Int = rotaryScrollAdapter.currentItemIndex() variable in DefaultSnapBehavior 646 snapTarget += moveForElements in prepareSnapForItems() 648 snapTarget = rotaryScrollAdapter.currentItemIndex() + moveForElements in prepareSnapForItems() 651 snapTarget = snapTarget.coerceIn(0 until rotaryScrollAdapter.totalItemsCount()) in prepareSnapForItems() 667 snapTarget = rotaryScrollAdapter.currentItemIndex() in snapToClosestItem() 671 override fun topEdgeReached(): Boolean = snapTarget <= 0 in topEdgeReached() 674 snapTarget >= rotaryScrollAdapter.totalItemsCount() - 1 in topEdgeReached() 689 debugLog { "snapTarget $snapTarget" } in topEdgeReached() 693 expectedDistance = expectedDistanceTo(snapTarget, snapParameters.snapOffset) in topEdgeReached() 729 if (rotaryScrollAdapter.currentItemIndex() == snapTarget) { in topEdgeReached()
|