mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Dashed line improvement
This commit is contained in:
parent
8146c5243a
commit
38efddcb8f
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue