I am creating an alertdialog, where in the message I put a String. That String come with some text I wish to make them links, so when they are shown in the dialog, the user can click over them and go to other views. Let me show you an example of what I want:
public class Activity extends FragmentActivity{
(...)
public void myMethod(){
String message = "Some links: link1, link2, link3";
AlertDialog.Builder builder = new AlertDialog.Builder(this)
builder.setTitle("This is a title");
builder.setMessage(message);
builder.setCancelable(true);
builder.setOnCancelListener(onCancelListener);
builder.create().show();
}
}
I want to do something to link1, link2 and link3 so when they are shown in the dialog, they appear as links. Then, when the user clicks over link1, a new activity is show; when clicks over link2, another view is shown, and the same with link3.
I wanted to have a onlinkclicklistener or something like that so I capture when the user clicks over the link.
Any ideas of how to do that? I hope you can understand what I want :)