If I created a TevtView with 3 Lines via TextView.setLines(3). Would it be possible to have each line in a different color? The Reason why I'm asking is that i want to have a multi-color, multil-ine Button
this is easy. Below is the sample: TextView tv = new TextView(xx); SpannableStringBuilder text = new SpannableStringBuilder("xxxxxx"); text.setspan(new ForegroundColorSpan(Color.RED), startIndex, len, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); tv.setText(text); the string from startIndex and to startIndex +len will be the color red.
Is there any body worked with android spannable class. If it is the case please help me. How to get the bold text into un bold ,means after appling the bold property with sannable, how to remove after selecting the bold text and clicking on the button.Please help me