It turned out how to make hanging padding work for my own project. Basically you need to use android.text.style.LeadingMarginSpan and apply it to the text through code. LeadingMarginSpan.Standard accepts either the full indent constructor (1 param) or the indent constructor (2 params), and you need to create a new Span object for each substring that you want to apply the style to. TextView itself must also have its own BufferType for SPANNABLE.
If you need to do this several times or want to include indentation in your style, try creating a subclass of TextView that uses a special indent attribute and automatically applies span. I got a lot of benefit from this Custom Views and XML attributes from the Statically Typed blog, and the SO question is declaring an Android user interface user element using XML .
In TextView:
Mandisaw
source share