/// M: for secondary progress feature @{ public void setSecondaryProgress(int percent) { if (LOG) { MtkLog.v(TAG, "setSecondaryProgress(" + percent + ")"); } mSecondaryProgressExt.setSecondaryProgress(mProgressBar, percent); invalidate(); }
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); // draw progress bars canvas.drawRect(mProgressBar, mProgressPaint); mSecondaryProgressExt.draw(canvas, mProgressBar); canvas.drawRect(mPlayedBar, mPlayedPaint); // draw scrubber and timers if (mShowScrubber) { canvas.drawBitmap(mScrubber, mScrubberLeft, mScrubberTop, null); } if (mShowTimes) { canvas.drawText( stringForTime(mCurrentTime), mTimeBounds.width() / 2 + getPaddingLeft(), mTimeBounds.height() + mVPaddingInPx / 2 + mScrubberPadding + 1 + mLayoutExt.getTimeOffset(), mTimeTextPaint); canvas.drawText( stringForTime(mTotalTime), getWidth() - getPaddingRight() - mTimeBounds.width() / 2, mTimeBounds.height() + mVPaddingInPx / 2 + mScrubberPadding + 1 + mLayoutExt.getTimeOffset(), mTimeTextPaint); } mInfoExt.draw(canvas, mLayoutExt.getInfoBounds(this, mTimeBounds)); }