Code example for AnimatorSet

Methods: cancel

0
    /** 
     * Cancel an in progress animation 
     */ 
    public static void cancel() { 
        if (mSetAnim != null)
            mSetAnim.cancel();
    } 
 
    /** 
     * Clean stuff 
     * 
     * @param activity The Activity where the animation is occurring 
     */ 
    private static void clean(Activity activity) {
        if (mTopImage != null) {
            mTopImage.setLayerType(View.LAYER_TYPE_NONE, null);
            try { 
                // If we use the regular removeView() we'll get a small UI glitch 
                activity.getWindowManager().removeViewImmediate(mBottomImage);
            } catch (Exception ignored) {
            }