List of usage examples for android.webkit WebView setScrollContainer
public void setScrollContainer(boolean isScrollContainer)
From source file:com.jwork.dhammapada.MainActivity.java
public void displayChangeLog() { AlertDialog dialog = new AlertDialog.Builder(this).create(); dialog.setTitle("Changelog"); WebView wv = new WebView(this); wv.loadData(getString(R.string.changelog_dialog_text), "text/html", "utf-8"); wv.setScrollContainer(true); dialog.setView(wv);//from ww w. ja v a 2 s . c om dialog.setButton(AlertDialog.BUTTON_NEGATIVE, getString(android.R.string.ok), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Configuration.getInstance(MainActivity.this) .setCurrentVersion(CrashHandler.getVersionCode(MainActivity.this)); dialog.dismiss(); } }); dialog.setButton(AlertDialog.BUTTON_POSITIVE, "Rate It", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Configuration.getInstance(MainActivity.this) .setCurrentVersion(CrashHandler.getVersionCode(MainActivity.this)); dialog.dismiss(); Uri uri = Uri.parse("market://details?id=" + MainActivity.this.getPackageName()); Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri); try { MainActivity.this.startActivity(myAppLinkToMarket); } catch (ActivityNotFoundException e) { Toast.makeText(MainActivity.this, "Failed to find Market application", Toast.LENGTH_LONG) .show(); } } }); dialog.setButton(AlertDialog.BUTTON_NEUTRAL, "Donate", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Configuration.getInstance(MainActivity.this) .setCurrentVersion(CrashHandler.getVersionCode(MainActivity.this)); dialog.dismiss(); openDonate(); } }); dialog.show(); }
From source file:com.jwork.spycamera.MainFragment.java
private void showHelp() { AlertDialog dialog = new AlertDialog.Builder(activity).create(); dialog.setTitle(this.getString(R.string.help)); WebView wv = new WebView(activity); wv.loadData(this.getString(R.string.help_html), "text/html", "utf-8"); wv.setScrollContainer(true); dialog.setView(wv);/*from w w w .j a va 2 s.c o m*/ dialog.setButton(AlertDialog.BUTTON_NEGATIVE, this.getString(android.R.string.ok), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); dialog.setButton(AlertDialog.BUTTON_POSITIVE, "Rate It", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Uri uri = Uri.parse("market://details?id=" + activity.getPackageName()); Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri); try { activity.startActivity(myAppLinkToMarket); } catch (ActivityNotFoundException e) { Toast.makeText(activity, "Failed to find Market application", Toast.LENGTH_LONG).show(); } } }); dialog.setButton(AlertDialog.BUTTON_NEUTRAL, "Share It", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Utility.shareIt(activity); } }); dialog.show(); }