我想要一个弹出框,我想让框中的文字超链接框中的任何有效链接。在我的示例中,它是一个电子邮件地址。我目前正在使用AlertDialog,有什么方法可以使链接可点击,或者我应该尝试别的吗?
答案 0 :(得分:1)
我没有看到你的代码。它是一个自定义对话框??你可以在AlerDialog中放置按钮
AlertDialog alertDialog = new AlertDialog.Builder(a).create();
alertDialog.setTitle(title);
alertDialog.setMessage(message);
alertDialog.setButton2("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
//place what you want to do here
return ;
} });
alertDialog.show();
答案 1 :(得分:0)
根据您要执行的操作的复杂程度,您可能会考虑使用TextView
Creating a Custom Dialog。然后,您可以使用布局xml中TextView
的{{3}}属性。