Sunday, August 15, 2010

How to add a linkable text in Dialog

It's a example to add a linkable text in a dialog, using Linkify.

linkable text in Dialog

 private void openOptionsMySiteDialog()

final SpannableString stMyWeb = new SpannableString("");
Linkify.addLinks(stMyWeb, Linkify.ALL);

final AlertDialog aboutDialog = new AlertDialog.Builder(MyActivity.this)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub



1 comment:

Basribaz said...

good tutorial, thanks