title: Custom view refresh: postInvalidate vs drawableStateChanged: which one should I use?
body: <p>I created a custom progressbar not dissimilar from:
  <a href="http://weavora.com/blog/2012/02/23/android-progressbar-with-text/" rel="nofollow">http://weavora.com/blog/2012/02/23/android-progressbar-with-text/</a>
  or <a href="http://colintmiller.com/2010/10/how-to-add-text-over-a-progress-bar-on-android/" rel="nofollow">http://colintmiller.com/2010/10/how-to-add-text-over-a-progress-bar-on-android/</a></p>
  
  <p>I noticed that during operations relating to canvas, such as canvas.drawText() within an overriden onDraw method, both authors opted to somehow invalidate the state of the view.</p>
  
  <p>One used postInvalidate(), the other drawableStateChanged().</p>
  
  <p>None explained their reasoning. </p>
  
  <p>Can someone shed some light as to which one is the most 'appropriate way' of going forward?</p>
  
  <p>Thank you.</p>