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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -