Android自定义实现圆形播放进度条

public void onDraw(Canvas canvas) {           // TODO Auto-generated method stub            super.onDraw(canvas);                              if (mBackgroundPicture == null)                                 // 没背景图的话就绘制底色            {               canvas.drawArc(mCircleAttribute.mRoundOval, 0360, mCircleAttribute.mBRoundPaintsFill, mCircleAttribute.mBottomPaint);           }                                 float subRate = (float)mSubCurProgress / mMaxProgress;           float subSweep = 360 * subRate;           canvas.drawArc(mCircleAttribute.mRoundOval, mCircleAttribute.mDrawPos, subSweep, mCircleAttribute.mBRoundPaintsFill, mCircleAttribute.mSubPaint);                      float rate = (float)mMainCurProgress / mMaxProgress;           float sweep = 360 * rate;           canvas.drawArc(mCircleAttribute.mRoundOval, mCircleAttribute.mDrawPos, sweep, mCircleAttribute.mBRoundPaintsFill, mCircleAttribute.mMainPaints);                     }  

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/psgjs.html