我必须设置动作以点击警告对话框文本开始活动我该怎么做才能帮忙。
我的代码在这里
SpannableStringBuilder builder = new SpannableStringBuilder();
String reminderMsg = "Please pay your bill now";
Spannable msg = new SpannableString(reminderMsg);
msg.setSpan(new ForegroundColorSpan(Color.BLACK), 0, reminderMsg.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
builder.append(msg);
String click = " Click here";
Spannable wordtoSpan = new SpannableString(click);
wordtoSpan.setSpan(new ForegroundColorSpan(Color.BLUE), 1, click.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
builder.append(wordtoSpan);
new AlertDialog.Builder(MiActivity.this)
.setMessage(builder)
.setPositiveButton("OK", null)
.show();