java - Indenting TextView Text in android -
i have textview
text let's say
• asking question stackoverflow
how can make textview
show like
• asking question stackoverflow string facil = accomodation.facilities; facil = facil.replace("<>", "%"); spanned sp = html.fromhtml(facil); facil = sp.tostring(); string[] items = facil.split("%"); charsequence allfacil = ""; (int = 0; < items.length; i++) { string text = items[i]; spannablestring s = new spannablestring("• " + text + "\n"); s.setspan(new bulletspan(bulletspan.standard_gap_width), 0, text.length(), 0); allfacil = textutils.concat(allfacil, s); } facilities.settext(allfacil.tostring());
i have done this...
string[] items = new string[] { "item 1", "item 2", "item 3" }; charsequence alltext = ""; (int = 0; < items.length; i++) { string text = items[i]; spannablestring s = new spannablestring(text + "\n"); s.setspan(new bulletspan(bulletspan.standard_gap_width), 0, text.length(), 0); alltext = textutils.concat(alltext, s); }
...
public class bulletspan implements leadingmarginspan...
Comments
Post a Comment