Android Open Source - matkakortti-widget About App Activity






From Project

Back to project page matkakortti-widget.

License

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.

Java Source Code

/*
 * 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();
    }
}




Java Source Code List

fi.iki.dezgeg.matkakorttiwidget.gui.AboutAppActivity.java
fi.iki.dezgeg.matkakorttiwidget.gui.HomescreenWidgetProvider.java
fi.iki.dezgeg.matkakorttiwidget.gui.MatkakorttiWidgetApp.java
fi.iki.dezgeg.matkakorttiwidget.gui.SettingsActivity.java
fi.iki.dezgeg.matkakorttiwidget.gui.Utils.java
fi.iki.dezgeg.matkakorttiwidget.gui.WidgetUpdaterService.java
fi.iki.dezgeg.matkakorttiwidget.matkakortti.Card.java
fi.iki.dezgeg.matkakorttiwidget.matkakortti.MatkakorttiApi.java
fi.iki.dezgeg.matkakorttiwidget.matkakortti.MatkakorttiException.java
fi.iki.dezgeg.matkakorttiwidget.matkakortti.NonverifyingSSLSocketFactory.java