mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Fixes on Chat list.
This commit is contained in:
committed by
Greyson Parrelli
parent
a805f9b6b4
commit
076facbdc2
@@ -37,8 +37,9 @@ public final class SpanUtil {
|
||||
|
||||
public static final String SPAN_PLACE_HOLDER = "<<<SPAN>>>";
|
||||
|
||||
private final static Typeface BOLD_TYPEFACE = Typeface.create("sans-serif-medium", Typeface.NORMAL);
|
||||
private final static Typeface LIGHT_TYPEFACE = Typeface.create("sans-serif", Typeface.NORMAL);
|
||||
private final static Typeface MEDIUM_BOLD_TYPEFACE = Typeface.create("sans-serif-medium", Typeface.BOLD);
|
||||
private final static Typeface BOLD_TYPEFACE = Typeface.create("sans-serif-medium", Typeface.NORMAL);
|
||||
private final static Typeface LIGHT_TYPEFACE = Typeface.create("sans-serif", Typeface.NORMAL);
|
||||
|
||||
public static CharSequence italic(CharSequence sequence) {
|
||||
return italic(sequence, sequence.length());
|
||||
@@ -212,8 +213,16 @@ public final class SpanUtil {
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static CharacterStyle getMediumBoldSpan() {
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
return new TypefaceSpan(MEDIUM_BOLD_TYPEFACE);
|
||||
} else {
|
||||
return new StyleSpan(Typeface.BOLD);
|
||||
}
|
||||
}
|
||||
|
||||
public static CharacterStyle getBoldSpan() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
return new TypefaceSpan(BOLD_TYPEFACE);
|
||||
} else {
|
||||
return new StyleSpan(Typeface.BOLD);
|
||||
@@ -221,7 +230,7 @@ public final class SpanUtil {
|
||||
}
|
||||
|
||||
public static CharacterStyle getNormalSpan() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
return new TypefaceSpan(LIGHT_TYPEFACE);
|
||||
} else {
|
||||
return new StyleSpan(Typeface.NORMAL);
|
||||
|
||||
Reference in New Issue
Block a user