Code example for ValueAnimator

Methods: cancel

0
        if (!mScroller.isFinished()) {
            mScroller.computeScrollOffset();
            setPieRotation(mScroller.getCurrY());
        } else { 
            if (Build.VERSION.SDK_INT >= 11) {
                mScrollAnimator.cancel();
            } 
            onScrollFinished(); 
        } 
    } 
 
    private void setLayerToSW(View v) {
        if (!v.isInEditMode() && Build.VERSION.SDK_INT >= 11) {
            setLayerType(View.LAYER_TYPE_SOFTWARE, null);
        } 
    } 
 
    private void setLayerToHW(View v) {
        if (!v.isInEditMode() && Build.VERSION.SDK_INT >= 11) {
            setLayerType(View.LAYER_TYPE_HARDWARE, null);
        }