mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Dashed line improvement
This commit is contained in:
@@ -2289,13 +2289,14 @@ public class HtmlHelper {
|
||||
setSpan(ssb, new StyleSpan(Typeface.BOLD), start, ssb.length());
|
||||
break;
|
||||
case "hr":
|
||||
boolean dashed = "true".equals(element.attr("x-dashed"));
|
||||
LineSpan[] lines = null;
|
||||
if (ssb.length() > 0)
|
||||
if (dashed && ssb.length() > 0)
|
||||
lines = ssb.getSpans(ssb.length() - 1, ssb.length() - 1, LineSpan.class);
|
||||
if (lines == null || lines.length == 0) {
|
||||
ssb.append(LINE);
|
||||
float stroke = context.getResources().getDisplayMetrics().density;
|
||||
float dash = ("true".equals(element.attr("x-dashed")) ? dp3 : 0f);
|
||||
float dash = (dashed ? dp3 : 0f);
|
||||
setSpan(ssb, new LineSpan(colorSeparator, stroke, dash), start, ssb.length());
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user