Skip to content

Instantly share code, notes, and snippets.

@kojiokb
Created June 3, 2012 09:56
Show Gist options
  • Save kojiokb/2862862 to your computer and use it in GitHub Desktop.
Save kojiokb/2862862 to your computer and use it in GitHub Desktop.
スプラッシュ画面を表示する方法
public class SplashActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
startActivity(intent);
finish();
}
};
handler.sendEmptyMessageDelayed(0, 3000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment