Code example for TimeAnimator

Methods: setTimeListener

0
    } 
 
    public PanelView(Context context, AttributeSet attrs) {
        super(context, attrs);
 
        mTimeAnimator = new TimeAnimator();
        mTimeAnimator.setTimeListener(mAnimationCallback);
    } 
 
    private void loadDimens() { 
        final Resources res = getContext().getResources();
 
        mSelfExpandVelocityPx = res.getDimension(R.dimen.self_expand_velocity);
        mSelfCollapseVelocityPx = res.getDimension(R.dimen.self_collapse_velocity);
        mFlingExpandMinVelocityPx = res.getDimension(R.dimen.fling_expand_min_velocity);
        mFlingCollapseMinVelocityPx = res.getDimension(R.dimen.fling_collapse_min_velocity);
 
        mFlingGestureMinDistPx = res.getDimension(R.dimen.fling_gesture_min_dist);
 
        mCollapseMinDisplayFraction = res.getFraction(R.dimen.collapse_min_display_fraction, 1, 1);
        mExpandMinDisplayFraction = res.getFraction(R.dimen.expand_min_display_fraction, 1, 1);