I have made splash screen and now i want to display my main screen after disappearing the splash screen. I have done coding for the splash screen.
JAVA FILE:
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
public class CardGame extends Activity {
/** Called when the activity is first created. */
private final int splash_length = 3000;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.main);
new Handler().postDelayed(new Runnable(){
public void run(){
try {} catch(Exception e){};
CardGame.this.finish();
}
}, splash_length);
}
}
XML FILE:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:id = "@+id/imgView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background = "@drawable/splash_screen"
/>
</LinearLayout>
Now what should i do? Tell me.
These are files are the part of my project. Help me as much as possible.
Thanks...




