Android Open Source - CoinFlip About Activity






From Project

Back to project page CoinFlip.

License

The source code is released under:

GNU General Public License

If you think the Android project CoinFlip 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

/*
 *========================================================================
 * AboutActivity.java//from   ww  w . j  a v a 2s.  com
 * Jul 12, 2014 4:31 PM | variable
 * Copyright (c) 2014 Richard Banasiak
 *========================================================================
 * This file is part of CoinFlip.
 *
 *    CoinFlip is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    CoinFlip is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with CoinFlip.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.banasiak.coinflip;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class AboutActivity extends Activity {

    // debugging tag
    private static final String TAG = AboutActivity.class.getSimpleName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Log.d(TAG, "onCreate()");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.about);

        // pull the version name from the manifest so it doesn't have to be manually updated in the strings files
        try {
            String versionName = getPackageManager()
                    .getPackageInfo(getPackageName(), 0).versionName;
            Log.d(TAG, "versionName=" + versionName);
            TextView versionText = (TextView) findViewById(R.id.about_version_text_view);
            versionText.setText(versionName);
        } catch (NameNotFoundException e) {
            // nothing
        }

        // create a link to the Play store so users can easily rate this app
        Button rateButton = (Button) findViewById(R.id.about_rate_button);
        rateButton.setOnClickListener(new OnClickListener() {
            public void onClick(final View v) {
                final Intent goToMarket = new Intent(Intent.ACTION_VIEW,
                        Uri.parse("market://details?id=" + getPackageName()));
                startActivity(goToMarket);
            }
        });
    }
}




Java Source Code List

com.banasiak.coinflip.AboutActivity.java
com.banasiak.coinflip.CoinFlipActivity.java
com.banasiak.coinflip.CoinFlipWearActivity.java
com.banasiak.coinflip.DataLayerListenerService.java
com.banasiak.coinflip.InstallReceiver.java
com.banasiak.coinflip.SelfTestActivity.java
com.banasiak.coinflip.SelfTestStatus.java
com.banasiak.coinflip.SelfTestTask.java
com.banasiak.coinflip.Settings.java
com.banasiak.coinflip.ShakeListener.java
com.banasiak.coinflip.SliderPreference.java
com.banasiak.coinflip.lib.Animation.java
com.banasiak.coinflip.lib.ApplicationTest.java
com.banasiak.coinflip.lib.Coin.java
com.banasiak.coinflip.lib.CustomAnimationDrawable.java
com.banasiak.coinflip.lib.Util.java