Android Open Source - Race2GED Splash Screen






From Project

Back to project page Race2GED.

License

The source code is released under:

GNU General Public License

If you think the Android project Race2GED 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 edu.mecc.race2ged;
/*from   ww  w.j  a  va  2 s  .c om*/
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationSet;
import android.widget.ImageView;

public class SplashScreen extends Activity implements AnimationListener {

    ImageView logo;
    int phase = 0;

    /**
     * Called when the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.splash_layout);

        logo = (ImageView) findViewById(R.id.logo);
        Animation fadeIn = new AlphaAnimation(0, 1);
        //fadeIn.setInterpolator(new DecelerateInterpolator()); //add this
        fadeIn.setDuration(250);

        Animation fadeOut = new AlphaAnimation(1, 0);
        //fadeOut.setInterpolator(new AccelerateInterpolator()); //and this
        fadeOut.setStartOffset(1500);
        fadeOut.setDuration(250);

        AnimationSet animation = new AnimationSet(false); //change to false
        animation.addAnimation(fadeIn);
        animation.addAnimation(fadeOut);

        animation.setAnimationListener(this);

        logo.startAnimation(animation);


    }

    public void onAnimationEnd(Animation animation) {

        if (phase <= 1) {
            logo.setImageDrawable(getApplication().getResources().getDrawable(R.drawable.adulted_logo_recreated_big_extra_text_effects));
            animation.reset();
            logo.startAnimation(animation);
            phase++;

        } else {
            logo.setAlpha(0);
            startActivity(new Intent(this, Race2GEDActivity.class));
            this.finish();
        }


    }

    public void onAnimationRepeat(Animation animation) {
        // TODO Auto-generated method stub

    }

    public void onAnimationStart(Animation animation) {
        //logo.setAlpha(0);

    }
}




Java Source Code List

edu.mecc.race2ged.AboutDevActivity.java
edu.mecc.race2ged.BuildConfig.java
edu.mecc.race2ged.ContactActivity.java
edu.mecc.race2ged.CustomDialog.java
edu.mecc.race2ged.FeedBackActivity.java
edu.mecc.race2ged.FreeResourcesActivity.java
edu.mecc.race2ged.GoTab.java
edu.mecc.race2ged.HowGedActivity.java
edu.mecc.race2ged.LoAActivity.java
edu.mecc.race2ged.LocationsActivity.java
edu.mecc.race2ged.MathActivity.java
edu.mecc.race2ged.MathAltActivity.java
edu.mecc.race2ged.MathAltGuidelinesActivity.java
edu.mecc.race2ged.MathGuidelinesActivity.java
edu.mecc.race2ged.MathMultipleActivity.java
edu.mecc.race2ged.NewGedActivity.java
edu.mecc.race2ged.Race2GEDActivity.java
edu.mecc.race2ged.ReadWriteActivity.java
edu.mecc.race2ged.ReadingGuidelinesActivity.java
edu.mecc.race2ged.ReadingInfo1Activity.java
edu.mecc.race2ged.ReadingMultiActivity.java
edu.mecc.race2ged.ReadySetGoActivity.java
edu.mecc.race2ged.ReadyTab.java
edu.mecc.race2ged.ScienceActivity.java
edu.mecc.race2ged.ScienceGuidelinesActivity.java
edu.mecc.race2ged.ScienceMultiActivity.java
edu.mecc.race2ged.SetTab.java
edu.mecc.race2ged.SocInfo1Activity.java
edu.mecc.race2ged.SocialStudiesActivity.java
edu.mecc.race2ged.SocialStudiesGuidelinesActivity.java
edu.mecc.race2ged.SocialStudiesMultiActivity.java
edu.mecc.race2ged.SourcesActivity.java
edu.mecc.race2ged.SplashScreen.java
edu.mecc.race2ged.TheGedActivity.java
edu.mecc.race2ged.VideoTestimonialActivity.java
edu.mecc.race2ged.WhatGedActivity.java
edu.mecc.race2ged.WritingGuidelinesActivity.java
edu.mecc.race2ged.WritingMultiActivity.java