//退出进度值
private float mExitProgress = 0 ;
//每次递增的进度值
private float mExitIncrement = 16f/280;
//进入动画查值器,用于实现从慢到快的效果
private Interpolator mExitInterpolator = new AccelerateInterpolator(2);
//动画回调
private Runnable mExitRunnable = new Runnable() {
@Override
public void run() {
//进入时,首先判断进入动画是否具有
if(!mEnterDone)
return;
mExitProgress = mExitProgress+mExitIncrement;
// TODO Auto-generated method stub
if(mExitProgress>1){
onExitProgress(1);
onExitDone();
return;
}
float realProgress = mExitInterpolator.getInterpolation(mExitProgress);
onExitProgress(realProgress);
//延迟16毫秒,保证界面刷新频率接近60FPS
scheduleSelf(this, SystemClock.uptimeMillis()+16);
}
};