title: Custom Seekbar in android
body: <p>I am trying to build the custom seekbar in Android.What I have done is like</p>
  
  <p><a href="http://postimg.org/image/oc09ta8f9" rel="nofollow">Custom SeekBar</a></p>
  
  <p>I want is to show the progress below the seekbar like</p>
  
  <p><a href="http://s1.postimg.org/d3divi8rj/14283245376243.png" rel="nofollow">Desired Image</a></p>
  
  <p>Here is my code</p>
  
  <pre><code>protected synchronized void onDraw(Canvas canvas) {
      try {
          super.onDraw(canvas);
          mText = String.valueOf(getProgress());
          mTextWidth = mPaint.measureText(mText);
          Rect bounds = this.getProgressDrawable().getBounds();
  
          float xImg = bounds.width() * getProgress() / getMax() + imagepaddingleft + oldPaddingLeft;
          float yImg = imagepaddingtop + oldPaddingTop;
          float xText = bounds.width() * getProgress() / getMax() + mImgWidth / 2 - mTextWidth / 2 + textpaddingleft + oldPaddingLeft;
          float yText = yImg + textpaddingtop + mImgHei / 2 + getTextHei() / 4;
  
          canvas.drawBitmap(bm, xImg, yImg, mPaint);
          canvas.drawText(mText, xText, yText, mPaint);
  
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>Any help will be appreciated.</p>