¾È±Ô °øºÎ¹æ

Android > À̺¥Æ® ¹ß»ý½Ã ActivityÀÇ ÇÔ¼ö È£Ãâ¹æ¹ý.

µî·ÏÀÏ : 2017-07-05 10:57 Á¶È¸¼ö : 53,221

Main1.class ÆÄÀÏ ¾È¿¡ steupTabs() , moveTabs() ÇÔ¼ö°¡ Á¸Àç ÇÕ´Ï´Ù.

Sub3.class ÆÄÀÏ¿¡¼­ Main1.class ¿¡ ÀÖ´Â ÇÔ¼ö¸¦ È£ÃâÇÏ°í ½Í½À´Ï´Ù. ¾î¶»°Ô ÇØ¾ß ÇÒ±î¿ä?


Main1.java ÆÄÀϳ»¿ë
 

	public class Main1 extends TabActivity  {
		  
		public void onCreate(Bundle savedInstanceState) 
		{    	
			super.onCreate(savedInstanceState);        
			setContentView(R.layout.main1);        
			setupTabs(); 
			moveTabs(0);
		}

		public void setupTabs() 
		{
			...Áß·«
		}
		
		public void moveTabs(int num) 
		{
			...Áß·«
		}		
	}


Sub03.java ÆÄÀÏ ³»¿ë
 

	public class Sub03 extends Activity {
	
		Main1 main1 = new Main1();

		public void onCreate(Bundle savedInstanceState) { 
			super.onCreate(savedInstanceState); 
			setContentView(R.layout.sub03); 
			 
			Button button01 = (Button) findViewById(R.id.button01);  
			
			button01.setOnClickListener(new OnClickListener() {
				public void onClick(View v) {        		       		
					Toast.makeText(getApplicationContext(),"ÈïÁ¤³»¿ªÀ¸·Î °©´Ï´Ù.",500).show();        		
					main1.moveTabs(1);        		 		
				}
			});
        
    } 

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