Back to project page matkakortti-widget.
The source code is released under:
GNU General Public License
If you think the Android project matkakortti-widget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Matkakortti Widget is licensed under GPLv2. * See LICENSE.txt for more information. *///from w ww . j a v a2 s . c o m package fi.iki.dezgeg.matkakorttiwidget.gui; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.preference.PreferenceManager; import android.webkit.WebView; import fi.iki.dezgeg.matkakorttiwidget.R; public class AboutAppActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); WebView vw = new WebView(this); vw.loadUrl("file:///android_asset/about.html"); vw.setBackgroundColor(0); new AlertDialog.Builder(this) .setCancelable(true) .setTitle(R.string.settings_aboutDialog_title) .setView(vw) .setNeutralButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int i) { dialog.cancel(); } }) .setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialogInterface) { PreferenceManager.getDefaultSharedPreferences(AboutAppActivity.this) .edit() .putBoolean("disclaimerShown", true) .commit(); AboutAppActivity.this.finish(); } }).show(); } }