Created
July 22, 2014 08:42
-
-
Save laaptu/1ae046ad494c23d40bab to your computer and use it in GitHub Desktop.
Dialog with linkable text, Dialog having clickable text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final TextView tv = new TextView(this); | |
final SpannableString s = new SpannableString(response); | |
Linkify.addLinks(s, Linkify.WEB_URLS); | |
tv.setText(s); | |
tv.setMovementMethod(LinkMovementMethod.getInstance()); | |
AlertDialog dialog = new AlertDialog.Builder(this) | |
.setPositiveButton(android.R.string.ok, null) | |
.setView(tv).create(); | |
dialog.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment