fermyth

Dialogbox Webview

Aug 17th, 2011
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. Creating Dialog box with Webview content
  2.  
  3. Dialog dialog = new Dialog(DrawingActivity.this);
  4.             LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  5.             View vi = inflater.inflate(R.layout.webviewdialog, null);
  6.             dialog.setContentView(vi);
  7.             dialog.setTitle("Calculator");
  8.             dialog.setCancelable(true);
  9.             WebView wb = (WebView) vi.findViewById(R.id.webview);
  10.         wb.getSettings().setJavaScriptEnabled(true);
  11.             wb.loadUrl("http://developer.android.com/guide/topics/ui/dialogs.html");
  12.             System.out.println("..loading url..");
  13.             dialog.show();
Advertisement
Add Comment
Please, Sign In to add comment