package com.raceontarantasses; import android.content.Intent; import android.media.MediaPlayer; import android.os.Bundle; import samodelkin.androidsimplestgamelibrary.*; public class HeadbandActivity extends GameActivity implements Runnable { private MediaPlayer headband; /** * Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); headband=MediaPlayer.create(this, R.raw.headband); headband.start(); setScreenMode(1); setContentView(R.layout.headband); new Thread(this).start(); } public void run(){ try{ Thread.sleep(4000); }catch(Exception e){} this.runOnUiThread(new Runnable(){public void run(){ headband.stop(); Intent i=new Intent(HeadbandActivity.this,MenuActivity.class); startActivity(i); finish(); }}); } }