title: Cursor not visible with BackgroundColorSpan
body: <p>I'm using a <code>BackgroundColorSpan</code> to highlight certain text inside a <code>EditText</code>. The problem I'm having is that the cursor of the text field is not visible if the colour has 100% alpha and very hard to see with a lower alpha.</p>
  
  <p>I've done some digging through the code of <code>EditText</code> and <code>Editor</code> (used to paint the text in <code>EditText</code>) and I've found that inside <code>Editor.onDraw(...)</code> the cursor is painted before the Layout (which in turn paints the text):</p>
  
  <pre><code>    if (highlight != null &amp;&amp; selectionStart == selectionEnd &amp;&amp; mCursorCount &gt; 0) {
  &gt;&gt;      drawCursor(canvas, cursorOffsetVertical);
          // Rely on the drawable entirely, do not draw the cursor line.
          // Has to be done after the IMM related code above which relies on the highlight.
          highlight = null;
      }
  
      if (mTextView.canHaveDisplayList() &amp;&amp; canvas.isHardwareAccelerated()) {
          drawHardwareAccelerated(canvas, layout, highlight, highlightPaint,
                  cursorOffsetVertical);
      } else {
  &gt;&gt;      layout.draw(canvas, highlight, highlightPaint, cursorOffsetVertical);
      }
  </code></pre>
  
  <p>Does anybody know how can I reverse this behaviour? The only options I can think of at the moment are either to paint the cursor myself or to do some reflexion voodoo. Both seem a bit overkill.</p>
  
  <hr>
  
  <p><strong>Update:</strong></p>
  
  <p>I've created a bug report for this on the Android issue tracker: <a href="https://code.google.com/p/android/issues/detail?id=172001" rel="nofollow">https://code.google.com/p/android/issues/detail?id=172001</a></p>