1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| public class Titre extends Activity implements LocationListener {
private final int STOPSPLASH=0;
private final long SPLASHTIME=5000;
private Handler ecran_splash=new Handler(){
@Override
public void handleMessage(Message msg){
switch(msg.what){
case STOPSPLASH:
Intent myIntent = new Intent().setClass(getApplicationContext(), Ecran.class);
startActivity(myIntent);
finish();
break;
}
super.handleMessage(msg);
}
};
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.titre);
Message msg=new Message();
msg.what=STOPSPLASH;
ecran_splash.sendMessageDelayed(msg, SPLASHTIME);
} |
Partager