Android Open Source - pingpongmadness Game Splash






From Project

Back to project page pingpongmadness.

License

The source code is released under:

Apache License

If you think the Android project pingpongmadness 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 br.com.pingpongmadness;
//w  ww .  j av a  2  s . c  om
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;

public class GameSplash extends Activity {
  // tempo para esperar durante a tela de aprensetao
    private static final int SPLASH_SCREEN_DELAY = 3000;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash); 
        
        new Thread() {
            @Override
            public void run() {
                try {
                    // fazer as inicializaces aqui

                    // espere alguns segundos antes de ir para a prxima tela
                    sleep(SPLASH_SCREEN_DELAY);
                }
                catch (InterruptedException e) {

                }
                catch (Exception e) {

                }
                finally {
                  // #FEATURE Mode: se tiver mais de um tem o GameSelect, se for s um j vai direto a tela do Mode 
                    // inicie a tela de seleco de level
                    Intent intentSelect = new Intent(GameSplash.this, GameSelect.class);
                    System.out.println("startActivity(intentSelect)...");
                    startActivity(intentSelect);
                }
            }
        }.start();

    }
    
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        // ignore qualquer tecla pressionada na tela de apresentacao
        return true;
    }
    
}




Java Source Code List

br.com.pingpongmadness.GameSelect.java
br.com.pingpongmadness.GameSplash.java
br.com.pingpongmadness.Level.java
br.com.pingpongmadness.Sequence.java
br.com.pingpongmadness.Shot.java
br.com.pingpongmadness.database.DatabaseAdapter.java