Android Open Source - APO-DZ-Android Easter Egg Activity






From Project

Back to project page APO-DZ-Android.

License

The source code is released under:

MIT License

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

package org.upennapo.app.activity;
/*w  w  w . j a va 2  s . c om*/
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

import org.upennapo.app.R;

/**
 * An easter egg activity that contains the APO-DZ Edition of 2048.
 *
 * @author Ronald Martin
 */
public class EasterEggActivity extends Activity {

    private WebView mWebView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        init(savedInstanceState);

        setContentView(mWebView);
    }

    private void init(Bundle savedInstanceState) {
        mWebView = new WebView(this);

        if (savedInstanceState == null) {
            mWebView.getSettings().setJavaScriptEnabled(true);
            mWebView.loadUrl(getString(R.string.apo_2048_url));
        } else {
            mWebView.restoreState(savedInstanceState);
        }
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        mWebView.saveState(outState);
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        mWebView.restoreState(savedInstanceState);
    }
}




Java Source Code List

org.upennapo.app.activity.AlumModeActivity.java
org.upennapo.app.activity.DirectoryActivity.java
org.upennapo.app.activity.DirectoryDetailsActivity.java
org.upennapo.app.activity.EasterEggActivity.java
org.upennapo.app.activity.LoginActivity.java
org.upennapo.app.activity.MainActivity.java
org.upennapo.app.activity.WebActivity.java
org.upennapo.app.adapter.AlphabeticalAdapter.java
org.upennapo.app.adapter.LinkAdapter.java
org.upennapo.app.fragment.AlumDirectoryFragment.java
org.upennapo.app.fragment.BrotherStatusFragment.java
org.upennapo.app.fragment.DirectoryFragment.java
org.upennapo.app.fragment.LinkListFragment.java
org.upennapo.app.fragment.NavigationDrawerFragment.java
org.upennapo.app.fragment.WebFragment.java
org.upennapo.app.model.Brother.java
org.upennapo.app.model.DataManager.java
org.upennapo.app.model.User.java