¾È±Ô °øºÎ¹æ

Android > Handler - postDelayed (´ë±âÈÄ ½ÇÇàÇϱâ)

µî·ÏÀÏ : 2017-07-06 17:21 Á¶È¸¼ö : 53,048

Handler¸¦ ÀÌ¿ëÇÏ¿© µô·¹ÀÌ(Áö¿¬)½ÃÅ°±â. .postDelayed

postDelayed  ¸Þ¼­µå¸¦ ÀÌ¿ëÇϸé ÀÛ¾÷À» Àá½Ã Áö¿¬½Ãų ¼ö ÀÖ½À´Ï´Ù. ¾îÇø¦ ½ÇÇà½ÃÄÑ º¸¸é ùȭ¸é À̹ÌÁö°¡ ³ª¿ÂÈÄ

1ÃÊÈÄ¿¡ ¸ÞÀÎ activity È­¸éÀ¸·Î ÀüȯµÇ´Â ¿¹Á¦¸¦ º¸¼ÌÀ» °Ì´Ï´Ù. ÀÌ °æ¿ì »ç¿ëÇÏ°Ô µÇ¸é °£´ÜÈ÷ ±¸Çö ÇÒ ¼ö ÀÖ½À´Ï´Ù.
 
	Handler mHandler = new Handler();
	mHandler.postDelayed(new Runnable()  {
		public void run() {
			
			//#¸í·É¾î

			MainActivity.this.finish();		//MainActivity ¿Ï·á
			
			Intent myIntent = new Intent(getApplicationContext(), main.class);
			startActivity(myIntent);		//main.class ½ÃÀÛ
		}
	}, 3000);
	



//3000(3ÃÊ) µÚ¿¡ #¸í·É¾î ¾Æ·¡ºÎºÐÀ» ½ÇÇàÇÑ´Ù.!  

MainActivity.this.finish(); //MainActivity ¿Ï·á
Intent myIntent = new Intent(getApplicationContext(), main.class);
startActivity(myIntent); //main.class ½ÃÀÛ

³¡. °£´ÜÇÏÁö¿äÀ×

 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.