3초 뒤 자동 화면 전환

프로그래밍/Android (Java)|2015. 1. 27. 10:57
반응형

IntroActivity.java (처음 화면)


import android.os.Handler;

import android.os.Message;

import android.content.Intent;


public class IntroActivity extends Activity {

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_intro);


Handler handler = new Handler() {

public void handleMessage(Message msg) {

super.handleMessage(msg);

startActivity(new Intent(IntroActivity.thisSysdocuActivity.class));

finish();

}

};

handler.sendEmptyMessageDelayed(0, 3000);


}

} 


반응형

댓글()