public class Main extends Activity{
Intent intent;
View mMenu1, mMenu2, mMenu3, mMenu4;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
mMenu1 = findViewById(R.id.menu1);
mMenu2 = findViewById(R.id.menu2);
mMenu3 = findViewById(R.id.menu3);
mMenu4 = findViewById(R.id.menu4);
findViewById(R.id.imgmenu1).setOnClickListener(mClickListener);
findViewById(R.id.imgmenu2).setOnClickListener(mClickListener);
findViewById(R.id.imgmenu3).setOnClickListener(mClickListener);
findViewById(R.id.imgmenu4).setOnClickListener(mClickListener);
}
ImageView.OnClickListener mClickListener = new ImageView.OnClickListener(){
@Override
public void onClick(View v) {
mMenu1.setVisibility(View.INVISIBLE);
mMenu2.setVisibility(View.INVISIBLE);
mMenu3.setVisibility(View.INVISIBLE);
mMenu4.setVisibility(View.INVISIBLE);
switch(v.getId()){
case R.id.imgmenu1:
mMenu1.setVisibility(View.VISIBLE);break;
case R.id.imgmenu2:
mMenu2.setVisibility(View.VISIBLE);break;
case R.id.imgmenu3:
mMenu3.setVisibility(View.VISIBLE);break;
case R.id.imgmenu4:
mMenu4.setVisibility(View.VISIBLE);break;
}
}
};
}
±Ùµ¥ ÀÌ°Ô ¸®½ºÆ®ºä´Â ´Ù¸¥Å¬·¡½º¸¦»ç¿ëÇÏ¿©¼ ºÒ·Á¿À·Á°íÇߴµ¥
¾×ƼºñƼ¸¦¾²´Â¹æ¹ý¹Û¿¡¸ð¸£°Ú´õ¶ó±¸¿ä...¤Ð¤Ð µµ¿ÍÁÖ¼¼¿ä...ÇÒÁپƽôºоȰè½Å°¡¿ä?
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)
|