68 lines
2.3 KiB
Java
68 lines
2.3 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.res.Resources;
|
||
|
import android.text.SpannableString;
|
||
|
import android.text.SpannableStringBuilder;
|
||
|
import android.text.TextPaint;
|
||
|
import android.text.style.ClickableSpan;
|
||
|
import android.text.style.StyleSpan;
|
||
|
import android.view.View;
|
||
|
|
||
|
/* renamed from: o.tXv, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes3.dex */
|
||
|
public final class C17046tXv {
|
||
|
|
||
|
/* renamed from: o.tXv$HBt */
|
||
|
/* loaded from: classes3.dex */
|
||
|
public interface HBt {
|
||
|
void e();
|
||
|
}
|
||
|
|
||
|
public static SpannableString Qo_(String str, String str2, Resources resources, HBt hBt, boolean z, int i, int i2) {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append(str);
|
||
|
sb.append(str2);
|
||
|
String obj = sb.toString();
|
||
|
SpannableString spannableString = new SpannableString(obj);
|
||
|
spannableString.setSpan(new ClickableSpan(hBt, z, resources, i2) { // from class: o.tXv.5
|
||
|
private Resources a;
|
||
|
private boolean c;
|
||
|
private int d;
|
||
|
private HBt e;
|
||
|
|
||
|
{
|
||
|
this.e = hBt;
|
||
|
this.c = z;
|
||
|
this.a = resources;
|
||
|
this.d = i2;
|
||
|
}
|
||
|
|
||
|
@Override // android.text.style.ClickableSpan
|
||
|
public final void onClick(View view) {
|
||
|
HBt hBt2 = this.e;
|
||
|
if (hBt2 != null) {
|
||
|
hBt2.e();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.text.style.ClickableSpan, android.text.style.CharacterStyle
|
||
|
public final void updateDrawState(TextPaint textPaint) {
|
||
|
super.updateDrawState(textPaint);
|
||
|
textPaint.setUnderlineText(this.c);
|
||
|
textPaint.setColor(kVs.nX_(this.a, this.d, null));
|
||
|
}
|
||
|
}, str.length(), obj.length(), 33);
|
||
|
if (i != 0) {
|
||
|
spannableString.setSpan(new StyleSpan(i), str.length(), obj.length(), 33);
|
||
|
}
|
||
|
return spannableString;
|
||
|
}
|
||
|
|
||
|
public static SpannableStringBuilder Qn_(String str, String str2) {
|
||
|
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(str);
|
||
|
int indexOf = str.indexOf(str2);
|
||
|
spannableStringBuilder.setSpan(new StyleSpan(1), indexOf, str2.length() + indexOf, 33);
|
||
|
return spannableStringBuilder;
|
||
|
}
|
||
|
}
|