OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.excelliance.kxqp.community.helper;
import android.content.Context;
import android.graphics.Color;
import android.text.SpannableString;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import com.excean.ggspace.main.R;
public class a {
public static void a(TextView textView, @StringRes int i, Runnable runnable) {
if (textView == null) {
return;
}
Context context = textView.getContext();
SpannableString a2 = a(context, context.getString(i), "https://m.ourplay.net/opActivity/convention/", runnable);
if (a2 == null) {
return;
}
textView.setMovementMethod(LinkMovementMethod.getInstance());
textView.setHighlightColor(0);
textView.setText(a2);
}
public static SpannableString a(final Context context, String str, final String str2, final Runnable runnable) {
if (TextUtils.isEmpty(str)) {
return null;
}
SpannableString spannableString = new SpannableString(str);
ClickableSpan clickableSpan = new ClickableSpan() {
@Override
public void onClick(@NonNull View view) {
l.a(context, str2);
if (runnable != null) {
runnable.run();
}
}
@Override
public void updateDrawState(@NonNull TextPaint textPaint) {
if (com.excelliance.user.account.router.a.a.f15594a.getDisplayNewTheme(context)) {
textPaint.setColor(context.getResources().getColor(R.color.new_main_color));
} else {
textPaint.setColor(Color.parseColor("#249D57"));
}
}
};
int indexOf = str.indexOf("《");
if (indexOf >= 0 && indexOf < str.length() - 1) {
spannableString.setSpan(clickableSpan, indexOf, str.length(), 17);
}
return spannableString;
}
}