Code example for ObjectAnimator

Methods: addListener

0
            return !isLeftSide(right);
        } 
    } 
 
    class DrawerAnimator { 
        ObjectAnimator mThumbPositionAnimator = new ObjectAnimator();
 
        { 
            mThumbPositionAnimator.addListener(new AnimatorListenerAdapter() {
                    @Override 
                    public void onAnimationEnd (Animator animation) {
                        boolean on = mDrawer.isOn();
 
                        Log.d(TAG, "onAnimationEnd, mDrawer.isOn = " + on);
 
                        if (on) {
                            USwitch.this.setChecked(true, false);
                        } else { 
                            USwitch.this.setChecked(false, false);
                        }