I want to set the background color of an entire line in TextView and not necessarily the part of the line covered by text (which I can do by using Span).
E.g. If say line 0, can accomodate 25 characters, but only has 12 characters. If I say
SpannableString s = new SpannableString("abcdefghijkl");
s.setSpan(new BackgroundColorSpan(0xffffffff), 0, 11, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
TextView t = new TextView();
t.setText(s);
This would set background color of half the line. But I want to have the entire line (entire width of TextView) to be filled with the background color. Also I want this to happen for only one line, not the entire TextView background.
Any idea how this can be achieved?