Lines Matching refs:velocity
290 * @param velocity The desired pixels/second speed at which the view should
293 private void dismissChild(final View view, float velocity) {
296 float newPos = determinePos(animView, velocity);
297 int duration = determineDuration(animView, newPos, velocity);
320 private int determineDuration(View animView, float newPos, float velocity) {
322 if (velocity != 0) {
326 .abs(velocity)));
333 private float determinePos(View animView, float velocity) {
335 if (velocity < 0 || (velocity == 0 && animView.getTranslationX() < 0)
337 || (velocity == 0 && animView.getTranslationX() == 0 && mSwipeDirection == Y)) {
345 public void snapChild(final View view, float velocity) {
430 float velocity = getVelocity(mVelocityTracker);
443 boolean childSwipedFastEnough = (Math.abs(velocity) > escapeVelocity)
444 && (Math.abs(velocity) > Math.abs(perpendicularVelocity))
445 && (velocity > 0) == (mCurrAnimView.getTranslationX() > 0)
448 Log.v(TAG, "Swipe/Dismiss: " + velocity + "/" + escapeVelocity + "/"
457 dismissChild(mCurrView, childSwipedFastEnough ? velocity : 0f);
459 snapChild(mCurrView, velocity);