title: Get absolute position for a given offset on TextView (Android)
body: <p>I have a TextView in which I want to place a solid color block over given words of the TextView, for example:</p>
  
  <p>"This is a text string, I want to put a rectangle over this WORD" - so, "WORD" would have a rectangle with a solid color over it.</p>
  
  <p>To do this, I am thinking about overriding the onDraw(Canvas canvas) method, in order to draw a block over the text. My only problem is to find an efficient way to get the absolute position of a given word or character.</p>
  
  <p>Basically, I am looking for something that does the exact opposite of the <a href="http://developer.android.com/reference/android/widget/TextView.html#getOffsetForPosition%28float,%20float%29" rel="nofollow noreferrer">getOffsetForPosition(float x, float y) method</a></p>