Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

html alert box android

 String message = "<p>Thank you for watching this video!</p>" +
                "<p><b>My Website</b> : <a href="https://codingwithsara.com">Tap Here</a></p>";

        AlertDialog alertDialog = new AlertDialog.Builder(this)
                .setTitle("Hello")
                .setMessage(Html.fromHtml(message))
                .setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        // Do something
                    }
                })
                .show();
 
PREVIOUS NEXT
Tagged: #html #alert #box #android
ADD COMMENT
Topic
Name
2+6 =