Android Open Source - openmbta-android Splash Screen






From Project

Back to project page openmbta-android.

License

The source code is released under:

Copyright (c) 2014 Kaja Software Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal...

If you think the Android project openmbta-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 com.kaja.openmbta;
/*  w  w w  .  j  a  va 2 s . c  o  m*/
import android.app.Activity;
import android.content.Intent;
import android.view.MotionEvent;
import android.os.Bundle;

public class SplashScreen extends Activity {
    
    /**
     * The thread to process splash screen events
     */
    private Thread mSplashThread;    

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Splash screen view
        setContentView(R.layout.splash);
        
        final SplashScreen splash_screen = this;   
        
        // The thread to wait for splash screen events
        mSplashThread =  new Thread(){
            @Override
            public void run(){
                try {
                    synchronized(this){
                        // Wait given period of time or exit on touch
                        wait(1000);
                    }
                }
                catch(InterruptedException ex){                    
                }

                finish();
                
                // Run next activity
                Intent intent = new Intent();
                intent.setClass(splash_screen, OpenMBTA.class);
                startActivity(intent);
                // removed call to stop() because it is deprecated.
                stop2(this);                    
            }
        
            public void stop2(Thread t){
              t = null;
            }
        };
        
        mSplashThread.start();        
    }
        
    /**
     * Processes splash screen touch events
     */
    @Override
    public boolean onTouchEvent(MotionEvent evt)
    {
        if(evt.getAction() == MotionEvent.ACTION_DOWN)
        {
            synchronized(mSplashThread){
                mSplashThread.notifyAll();
            }
        }
        return true;
    }    
}




Java Source Code List

com.kaja.openmbta.JsonParser.java
com.kaja.openmbta.KajaItemizedOverlay.java
com.kaja.openmbta.MergeAdapter.java
com.kaja.openmbta.OpenMBTA.java
com.kaja.openmbta.RItemizedOverlay.java
com.kaja.openmbta.RoutesItemizedOverlay.java
com.kaja.openmbta.Routes.java
com.kaja.openmbta.ScheduleAdapter.java
com.kaja.openmbta.ScheduleItem.java
com.kaja.openmbta.ScheduleTab.java
com.kaja.openmbta.SplashScreen.java
com.kaja.openmbta.TransDetails.java
com.kaja.openmbta.WebViewer.java
com.kaja.openmbta.hashFile.java
com.kaja.openmbta.transAdapter.java
com.kaja.openmbta.transItem.java
com.readystatesoftware.mapviewballoons.BalloonItemizedOverlay.java
com.readystatesoftware.mapviewballoons.BalloonOverlayView.java