Commit 8ff5208a by Baoxy

build: 兼容低版本

parent 88f66b55
......@@ -2,6 +2,7 @@ package com.secspace.lib.common.dialog.other;
import android.content.Context;
import android.os.Build;
import android.text.Html;
import android.text.InputType;
import android.text.TextUtils;
......@@ -136,7 +137,11 @@ public class AlertDialogHolder extends SuperHolder {
tvMsg.setVisibility(View.GONE);
} else {
tvMsg.setVisibility(View.VISIBLE);
tvMsg.setText(Html.fromHtml(bean.msg.toString(), FROM_HTML_MODE_LEGACY));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
tvMsg.setText(Html.fromHtml(bean.msg.toString(), FROM_HTML_MODE_LEGACY));
}else{
tvMsg.setText(Html.fromHtml(bean.msg.toString()));
}
// tvMsg.setTextColor(ToolUtils.getColor(tvMsg.getContext(), bean.msgTxtColor));
// tvMsg.setTextSize(bean.msgTxtSize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment