Here is example:
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Title here");
WebView wv = new WebView(this);
wv.loadUrl("http:\www.google.com");
wv.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
alert.setView(wv);
alert.setNegativeButton("Close", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
alert.show();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…