public class Intro extends Activity {
Handler myHandler = new Handler();
Runnable myRunnable = new Runnable() {
public void run() {
Intent i = new Intent(Intro.this, Host.class);
overridePendingTransition(R.anim.fade, R.anim.hold);
i.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
Intro.this.startActivity(i);
finish(); - 백했을경우 닫아 버리기
// overridePendingTransition(0,0);
// startActivity(new Intent(IntroActivity.this, netturn.class));
}
};
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.intro);
myHandler.postDelayed(myRunnable, 3000); // 딜레이 지정
}
public boolean onKeyDown(int keyCode, KeyEvent e) {
Log.v(null, "" + keyCode);
if (keyCode == KeyEvent.KEYCODE_BACK) {
}
return false;
}
public boolean onKeyDown1(int keyCode, KeyEvent e) {
Log.v(null, "" + keyCode);
if (keyCode == KeyEvent.KEYCODE_HOME) {
myHandler.removeCallbacks(myRunnable);
}
return false;
}
}
Handler myHandler = new Handler();
Runnable myRunnable = new Runnable() {
public void run() {
Intent i = new Intent(Intro.this, Host.class);
overridePendingTransition(R.anim.fade, R.anim.hold);
i.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
Intro.this.startActivity(i);
finish(); - 백했을경우 닫아 버리기
// overridePendingTransition(0,0);
// startActivity(new Intent(IntroActivity.this, netturn.class));
}
};
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.intro);
myHandler.postDelayed(myRunnable, 3000); // 딜레이 지정
}
public boolean onKeyDown(int keyCode, KeyEvent e) {
Log.v(null, "" + keyCode);
if (keyCode == KeyEvent.KEYCODE_BACK) {
}
return false;
}
public boolean onKeyDown1(int keyCode, KeyEvent e) {
Log.v(null, "" + keyCode);
if (keyCode == KeyEvent.KEYCODE_HOME) {
myHandler.removeCallbacks(myRunnable);
}
return false;
}
}
'개발도구 > aOS - 안드로이드 개발' 카테고리의 다른 글
[안드로이드] tab line 없애기 tabStripEnabled (0) | 2011.05.24 |
---|---|
[안드로이드] tab 높이 조절 (0) | 2011.05.24 |
[안드로이드] tabHost 와 tab버튼 이미지 변경 (0) | 2011.05.24 |
[안드로이드] 타이틀바 없애기 (0) | 2011.05.24 |
Log.d 숫자 찍어보기 (0) | 2011.05.23 |