Hello,
I am making a Card Game game on the android platform. I require splash
screen and then my game should start. I have done coding for the
splash screen and also tried for getting the main page after the
splash screen time is over. I am getting a run time error. That is why
i am not getting main page.
Give me solution of this topic as much as possible.
My CardGame.java file is look like here:
__________________________________________________________________
package android.CardGame;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.content.Intent;
import android.widget.ImageView;
import android.view.Menu;
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){};
onStop();
}
}, splash_length);
}
public void onStop(){
ImageView imgv = (ImageView)findViewById(R.id.imgView1);
imgv.setImageResource(R.drawable.background);
Intent intent = new Intent(CardGame.this,Menu.class);
CardGame.this.startActivity(intent);
startActivity(intent);
CardGame.this.finish();
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---