Slide show

Total Pageviews

Powered by Blogger.

Translate

Search This Blog

Pages

CREATE SPLASH SCREEN IN ANDROID

                         
                                Java Code of Splash Screen in Android:-


public class Flash extends Activity {

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);

        Timer t = new Timer();
        boolean checkConnection=new NetworkCheck().checkConnection(this);
        if (checkConnection) {
            t.schedule(new splash(), 3000);
        } else {
            Toast.makeText(Flash.this,
                    "connection not found...plz check connection", 3000).show();
        }
    }

    class splash extends TimerTask {

        @Override
        public void run() {
            Intent i = new Intent(Flash.this,Login.class);
            startActivity(i);
            finish();
        }

    }

   

}

No comments:

vehicles

business

health