Searched refs:snapFraction (Results 1 – 2 of 2) sorted by relevance
304 public void applySnapFraction(Rect stackBounds, Rect movementBounds, float snapFraction) { in applySnapFraction() argument305 if (snapFraction < 1f) { in applySnapFraction()306 int offset = movementBounds.left + (int) (snapFraction * movementBounds.width()); in applySnapFraction()308 } else if (snapFraction < 2f) { in applySnapFraction()309 snapFraction -= 1f; in applySnapFraction()310 int offset = movementBounds.top + (int) (snapFraction * movementBounds.height()); in applySnapFraction()312 } else if (snapFraction < 3f) { in applySnapFraction()313 snapFraction -= 2f; in applySnapFraction()314 int offset = movementBounds.left + (int) ((1f - snapFraction) * movementBounds.width()); in applySnapFraction()317 snapFraction -= 3f; in applySnapFraction()[all …]
247 final float snapFraction = mSnapAlgorithm.getSnapFraction(stackBounds, in transformBoundsToAspectRatio() local256 mSnapAlgorithm.applySnapFraction(stackBounds, getMovementBounds(stackBounds), snapFraction); in transformBoundsToAspectRatio()292 Rect getDefaultBounds(float snapFraction) { in getDefaultBounds() argument300 if (snapFraction != INVALID_SNAP_FRACTION) { in getDefaultBounds()303 mSnapAlgorithm.applySnapFraction(defaultBounds, movementBounds, snapFraction); in getDefaultBounds()347 final float snapFraction = getSnapFraction(postChangeStackBounds); in onTaskStackBoundsChanged() local355 snapFraction); in onTaskStackBoundsChanged()