mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Use highlight span instead of background color span
This commit is contained in:
18
app/src/main/java/eu/faircode/email/HighlightSpan.java
Normal file
18
app/src/main/java/eu/faircode/email/HighlightSpan.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package eu.faircode.email;
|
||||
|
||||
import android.text.TextPaint;
|
||||
import android.text.style.CharacterStyle;
|
||||
import android.text.style.UpdateAppearance;
|
||||
|
||||
public class HighlightSpan extends CharacterStyle implements UpdateAppearance {
|
||||
private int color;
|
||||
|
||||
public HighlightSpan(int color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDrawState(TextPaint tp) {
|
||||
tp.bgColor = color;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user