B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
Sleep(0)
Dim cs As CSBuilder
cs.Initialize
CallSub3(Me, "AddLeadingMarginSpan", cs, Array As Int(0dip, 30dip))
cs.Append("1) First do text text text, text text text text text text text").PopAll
CallSub3(Me, "AddLeadingMarginSpan", cs, Array As Int(0dip, 30dip))
cs.Append(CRLF).Append("2) Second do text text text, text text text text text text text").PopAll
Label1.Text = cs
End Sub
Sub AddLeadingMarginSpan(cs As Object, FirstAndRest() As Int)
Dim span As JavaObject
span.InitializeNewInstance("android.text.style.LeadingMarginSpan.Standard", Array(FirstAndRest(0), FirstAndRest(1)))
Dim jo As JavaObject = cs
jo.RunMethod("open", Array(span))
End Sub
You must use CallSub to call AddLeadingMarginSpan due to the way CSBuilder is implemented. The Sleep(0) is required if you want to call it from Activity_Create as otherwise the CallSub will be ignored (the activity is considered paused at that point).
The two numbers passed to AddLeadingMarginSpan are the first line margin and the other lines margin.
Note that in this example I've added two spans. One for each point.