Android翻页效果,电子书(8)
来源:未知 责任编辑:责任编辑 发表时间:2015-09-17 09:43 点击:次
}
private boolean computePageTurn() {
// if ((this.mDrawnTimeStep == this.mTimeStep) ||(this.mTimeStep <0)||(this.mTimeStep >this.mMaxStep)) {
if ( (this.mTimeStep <0)||(this.mTimeStep >this.mMaxStep)) {
return false;
}
if (this.mPage == null) {
return false;
}
this.mDrawnTimeStep = this.mTimeStep;
View child = this.mPage.getChildAt(0);
child.getDrawingRect(this.mChildRect);
// this.mOuterOffsetX = (child.getLeft() - getLeft());
// this.mOuterOffsetY = (child.getTop() - getTop());
this.mOuterOffsetX = 0;
this.mOuterOffsetY = 0;
float width = this.mChildRect.right;
float height = this.mChildRect.bottom;
if(!mStepping){
this.mPivotX = (this.mTimeStep / 30.0f * width);
}
this.mForegroundPath = new Path();
this.mBackPagePath = new Path();
this.mBackgroundPath = new Path();
float slope = width / (this.mPivotX - width);
float y = this.mPivotX * slope;
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>