html-textview
html-textview copied to clipboard
Nested list bullet points overlap text
This is reproducible only on Android 6.0. I have seen this on Genymotion and Nexus 5X. It appears only when list is nested in another one:
- Coffee
- Tea
- Black tea
- Green tea
- Milk
It seems that spaces between bullet point and text are ignored. Poor workaround for this is to add \t between the bullet point and a text.
Same here:
Same issue. Any update?
I am open for pull requests :grimacing:
Yeah, same bug
Same Issue with me as well. Do we have any work around?
yeah, same issue here.
same issue
Please try 3.6 and report back.
yes it still replicates at 3.6
same for 3.6
Same happening here on 3.6. Any update on this?
Still happening on 3.8. Perhaps we could put an explicit space character in the lists? Affects API 23 Sony Xperia Z3 compact tablet.
Also, how about inserting <pre>
tags and put spacing inside there? Will try it out first.
OK, I've found a workaround for unordered lists/bullet points. For Marshmallow, insert a ∙
followed by a space. There's a tiny visual artifact on the Sony tablet (both bullet points slightly overlapped making point wider) but on emulator it doesn't show.
String bulletPointFixCharacter;
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) {
//Fix for Marshmallow
bulletPointFixCharacter = "∙ ";
} else {
bulletPointFixCharacter = "";
}
String html =
"<p>\n" +
" <ol>\n" +
" <li>Item 1</li>\n" +
" <li>Item 2</li>\n" +
" <li>Item 3" +
" <ul>\n" +
" <li>" + bulletPointFixCharacter + "I'm a nested list item</li>\n" +
" </ul>\n" +
" </li>\n" +
" </ol>\n" +
"</p>";
Marshmallow API 23 (Sony tablet)
6.0 Marshmallow API 23 (emulator)
9.0 Pie API 28 (emulator)