OverScroller getCurrVelocity - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for OverScroller getCurrVelocity method.

This code example shows how to use the following methods:getCurrVelocity
     * @see android.view.ScaleGestureDetector#getCurrentSpanY() 
     */ 
    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
    public static float getCurrVelocity(OverScroller overScroller) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
            return overScroller.getCurrVelocity();
        } else { 
            return 0; 
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:getCurrVelocity
     * @see android.view.ScaleGestureDetector#getCurrentSpanY() 
     */ 
    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
    public static float getCurrVelocity(OverScroller overScroller) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
            return overScroller.getCurrVelocity();
        } else { 
            return 0; 
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:getCurrVelocity
	} 
 
	@TargetApi(14) 
	@Override 
	public float getCurrVelocity() { 
		return mScroller.getCurrVelocity();
	} 
 
	@Override 
	public boolean isFinished() { 
		return mScroller.isFinished();
	} 
 
	public boolean springBack( int startX, int startY, int minX, int maxX, int minY, int maxY ) {
		return mScroller.springBack( startX, startY, minX, maxX, minY, maxY );
	} 
 
	@Override 
	protected void _startUsingVelocity( int initialX, int velocity ) {
		mScroller.fling( initialX, 0, velocity, 0, mParent.getMinX(), mParent.getMaxX(), 0, Integer.MAX_VALUE, 10, 0 );
6
CodeRank
This code example shows how to use the following methods:computeScrollOffset, getCurrVelocity, getCurrX, getCurrY
        mDelegate.invalidate();
    } 
 
    // Called immediately before the draw to update the scroll offset. 
    public void computeScrollAndAbsorbGlow(OverScrollGlow overScrollGlow) {
        final boolean stillAnimating = mScroller.computeScrollOffset();
        if (!stillAnimating) return;
 
        final int oldX = mDelegate.getContainerViewScrollX();
        final int oldY = mDelegate.getContainerViewScrollY();
        int x = mScroller.getCurrX();
        int y = mScroller.getCurrY();
 
        int rangeX = computeMaximumHorizontalScrollOffset();
        int rangeY = computeMaximumVerticalScrollOffset();
 
        if (overScrollGlow != null) {
            overScrollGlow.absorbGlow(x, y, oldX, oldY, rangeX, rangeY,
                    mScroller.getCurrVelocity());
        } 

5
CodeRank
This code example shows how to use the following methods:getCurrVelocity
	} 
 
	@TargetApi(14) 
	@Override 
	public float getCurrVelocity() { 
		return mScroller.getCurrVelocity();
	} 
 
	@Override 
	public boolean isFinished() { 
		return mScroller.isFinished();
	} 
 
	@Override 
	public boolean springBack( int startX, int startY, int minX, int maxX, int minY, int maxY ) {
		return mScroller.springBack( startX, startY, minX, maxX, minY, maxY );
	} 
 
	@Override 
	protected void _startUsingVelocity( int initialX, int velocity ) {
5
CodeRank
This code example shows how to use the following methods:getCurrVelocity
    public int getPosition() { 
        return mScroller.getCurrX();
    } 
 
    public float getCurrVelocity() { 
        return mScroller.getCurrVelocity();
    } 
 
    public void setPosition(int position) {
        mScroller.startScroll(
                position, 0,    // startX, startY
                0, 0, 0);       // dx, dy, duration 
 
        // This forces the scroller to reach the final position. 
        mScroller.abortAnimation();
    } 
 
    public void fling(int velocity, int min, int max) {
        int currX = getPosition();
        mScroller.fling(
5
CodeRank
This code example shows how to use the following methods:getCurrVelocity
	} 
 
	@TargetApi(14) 
	@Override 
	public float getCurrVelocity() { 
		return mScroller.getCurrVelocity();
	} 
 
	@Override 
	public boolean isFinished() { 
		return mScroller.isFinished();
	} 
 
	@Override 
	public boolean springBack( int startX, int startY, int minX, int maxX, int minY, int maxY ) {
		return mScroller.springBack( startX, startY, minX, maxX, minY, maxY );
	} 
 
	@Override 
	protected void _startUsingVelocity( int initialX, int velocity ) {
4
CodeRank
This code example shows how to use the following methods:getCurrVelocity
	} 
 
	@TargetApi(14) 
	@Override 
	public float getCurrVelocity() { 
		return mScroller.getCurrVelocity();
	} 
 
	@Override 
	public boolean isFinished() { 
		return mScroller.isFinished();
	} 
 
	public boolean springBack( int startX, int startY, int minX, int maxX, int minY, int maxY ) {
		return mScroller.springBack( startX, startY, minX, maxX, minY, maxY );
	} 
 
	@Override 
	protected void _startUsingVelocity( int initialX, int velocity ) {
		mScroller.fling( initialX, 0, velocity, 0, mParent.getMinX(), mParent.getMaxX(), 0, Integer.MAX_VALUE, 10, 0 );
4
CodeRank
This code example shows how to use the following methods:getCurrVelocity
     * @see android.view.ScaleGestureDetector#getCurrentSpanY() 
     */ 
    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
    public static float getCurrVelocity(OverScroller overScroller) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
            return overScroller.getCurrVelocity();
        } else { 
            return 0; 
        } 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:getCurrVelocity
    public int getPosition() { 
        return mScroller.getCurrX();
    } 
 
    public float getCurrVelocity() { 
        return mScroller.getCurrVelocity();
    } 
 
    public void setPosition(int position) {
        mScroller.startScroll(
                position, 0,    // startX, startY
                0, 0, 0);       // dx, dy, duration 
 
        // This forces the scroller to reach the final position. 
        mScroller.abortAnimation();
    } 
 
    public void fling(int velocity, int min, int max) {
        int currX = getPosition();
        mScroller.fling(
4
CodeRank
getCurrVelocity Method Overview
Returns the absolute value of the current velocity.
See Code Examples for other Android OverScroller Methods: