There is another question like this, except I am trying to avoid TextView, since I don't have an XML file to accompany this error message. I am trying to redirect my user to a link when he clicks on the hyperlink text. Here is the code that I have so far:
public void messageAlert(){
String link = "www.google.com";
new AlertDialog.Builder(this)
.setTitle("ErrorMessage")
.setMessage("You have a massive error. Please go to "+ link) // hyperlink here
.setIcon(R.drawable.ic_action_error)
.setPositiveButton("Continue", new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog, int n){
}
})
.show();
}
Any help would be greatly appreciated! P.S. I am a beginner to Android