[에버플래닛 이것저것] 아이템 페이지 소스


*아래 소스는 실제 에버플래닛 이것저것에 적용 된 아이템 페이지의 소스입니다.*

 

public class ItemActivity extends Activity {

private AdView adView = null;

ImageView[] button = new ImageView[5];

ImageView[] footprint = new ImageView[11];

ImageView[] matbutton = new ImageView[4];

ImageView[] matpage = new ImageView[3];

ImageView[] mat = new ImageView[11];

ImageView[] transportbutton = new ImageView[7];

ImageView[] transportpage = new ImageView[4];

ImageView[] transport = new ImageView[11];

View[] view = new View[6];

ScrollView[] scroll = new ScrollView[3];

@Override

public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    setContentView(R.layout.main_item);     

        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

        initAdam();

        view();        

        

        button[1].setOnClickListener(new ImageView.OnClickListener(){

            public void onClick(View v) {

             view_all_gone();

             view[2].setVisibility(View.VISIBLE);

            }

        });

        button[2].setOnClickListener(new ImageView.OnClickListener(){

            public void onClick(View v) {

             view_all_gone();

             view[3].setVisibility(View.VISIBLE);

             mat();

            }

        });

        button[3].setOnClickListener(new ImageView.OnClickListener(){

            public void onClick(View v) {

             view_all_gone();

             view[4].setVisibility(View.VISIBLE);

             footprint();

            }

        });

        button[4].setOnClickListener(new ImageView.OnClickListener(){

            public void onClick(View v) {

             view_all_gone();

             view[5].setVisibility(View.VISIBLE);

             transport();

            }

        });

}

private void view() {

view[1] = (View)findViewById(R.id.item_select);

view[2] = (View)findViewById(R.id.item_wing);

view[3] = (View)findViewById(R.id.item_mat);

view[4] = (View)findViewById(R.id.item_footprint);

view[5] = (View)findViewById(R.id.item_transport);

button[1] = (ImageView)findViewById(R.id.wing_button);

        button[2] = (ImageView)findViewById(R.id.mat_button);

        button[3] = (ImageView)findViewById(R.id.foot_button);

        button[4] = (ImageView)findViewById(R.id.transport_button);

        

        //footprint view

        footprint[1] = (ImageView)findViewById(R.id.f1);

        footprint[2] = (ImageView)findViewById(R.id.f2);

        footprint[3] = (ImageView)findViewById(R.id.f3);

        footprint[4] = (ImageView)findViewById(R.id.f4);

        footprint[5] = (ImageView)findViewById(R.id.f5);

        footprint[6] = (ImageView)findViewById(R.id.f6);

        footprint[7] = (ImageView)findViewById(R.id.f7);

        footprint[8] = (ImageView)findViewById(R.id.f8);

        footprint[9] = (ImageView)findViewById(R.id.f9);

        

        //mat view

        matbutton[1] = (ImageView)findViewById(R.id.mat_button1);

        matbutton[2] = (ImageView)findViewById(R.id.mat_button2);

        matbutton[3] = (ImageView)findViewById(R.id.mat_button3);        

        matpage[1] = (ImageView)findViewById(R.id.mat_page1);

        matpage[2] = (ImageView)findViewById(R.id.mat_page2);        

        mat[1] = (ImageView)findViewById(R.id.m1);

        mat[2] = (ImageView)findViewById(R.id.m2);

        mat[3] = (ImageView)findViewById(R.id.m3);

        mat[4] = (ImageView)findViewById(R.id.m4);

        mat[5] = (ImageView)findViewById(R.id.m5);

        mat[6] = (ImageView)findViewById(R.id.m6);

        mat[7] = (ImageView)findViewById(R.id.m7);

        mat[8] = (ImageView)findViewById(R.id.m8);

        mat[9] = (ImageView)findViewById(R.id.m9);

        mat[10] = (ImageView)findViewById(R.id.m10);

        scroll[1] = (ScrollView)findViewById(R.id.scroll_mat);

        

        //transport view

        transportbutton[1] = (ImageView)findViewById(R.id.s25);

        transportbutton[2] = (ImageView)findViewById(R.id.s40);

        transportbutton[3] = (ImageView)findViewById(R.id.s42);     

        transportbutton[4] = (ImageView)findViewById(R.id.s45);  

        transportbutton[5] = (ImageView)findViewById(R.id.s46);  

        transportbutton[6] = (ImageView)findViewById(R.id.s48);  

        transportpage[1] = (ImageView)findViewById(R.id.transport_page1);

        transportpage[2] = (ImageView)findViewById(R.id.transport_page2);      

        transportpage[3] = (ImageView)findViewById(R.id.transport_page3); 

        transport[1] = (ImageView)findViewById(R.id.t1);

        transport[2] = (ImageView)findViewById(R.id.t2);

        transport[3] = (ImageView)findViewById(R.id.t3);

        transport[4] = (ImageView)findViewById(R.id.t4);

        transport[5] = (ImageView)findViewById(R.id.t5);

        transport[6] = (ImageView)findViewById(R.id.t6);

        transport[7] = (ImageView)findViewById(R.id.t7);

        transport[8] = (ImageView)findViewById(R.id.t8);

        transport[9] = (ImageView)findViewById(R.id.t9);

        transport[10] = (ImageView)findViewById(R.id.t10);

        scroll[2] = (ScrollView)findViewById(R.id.trans);

}

private void view_all_gone() {

view[1].setVisibility(View.GONE);

     view[2].setVisibility(View.GONE);

     view[3].setVisibility(View.GONE);

     view[4].setVisibility(View.GONE);

     view[5].setVisibility(View.GONE);

}

private void mat_button() {

matbutton[1].setImageResource(R.drawable.mat_menu1_button);

matbutton[2].setImageResource(R.drawable.mat_menu2_button);

matbutton[3].setImageResource(R.drawable.mat_menu3_button);

}

private void mat_page() {

matpage[1].setImageResource(R.drawable.page1);

matpage[2].setImageResource(R.drawable.page2);

}

private void mat() {

mat_button();

mat_page();

mat_button1_page1();

matbutton[1].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[1].post(new Runnable() {

            @Override

            public void run() {

             scroll[1].fullScroll(ScrollView.FOCUS_UP);

            }

        });

mat_button();

mat_page();

mat_button1_page1();

}

});

matbutton[2].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[1].post(new Runnable() {

            @Override

            public void run() {

             scroll[1].fullScroll(ScrollView.FOCUS_UP);

            }

        });

mat_button();

mat_button2();

}

});

matbutton[3].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[1].post(new Runnable() {

            @Override

            public void run() {

             scroll[1].fullScroll(ScrollView.FOCUS_UP);

            }

        });

mat_button();

mat_button3();

}

});

matpage[1].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[1].post(new Runnable() {

            @Override

            public void run() {

             scroll[1].fullScroll(ScrollView.FOCUS_UP);

            }

        });

mat_button();

mat_page();

mat_button1_page1();

}

});

matpage[2].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[1].post(new Runnable() {

            @Override

            public void run() {

             scroll[1].fullScroll(ScrollView.FOCUS_UP);

            }

        });

mat_button();

mat_page();

mat_button1_page2();

}

});

}

private void mat_button1_page1() {

matpage[1].setVisibility(View.VISIBLE);

matpage[2].setVisibility(View.VISIBLE);

matbutton[1].setImageResource(R.drawable.mat_menu1_button_pressed);

matpage[1].setImageResource(R.drawable.page1_pressed);

mat[1].setImageResource(R.drawable.mat1);

mat[2].setImageResource(R.drawable.mat2);

mat[3].setImageResource(R.drawable.mat3);

mat[4].setImageResource(R.drawable.mat4);

mat[5].setImageResource(R.drawable.mat5);

mat[6].setImageResource(R.drawable.mat6);

mat[7].setImageResource(R.drawable.mat9);

mat[8].setImageResource(R.drawable.mat10);

mat[9].setImageResource(R.drawable.mat11);

mat[10].setImageResource(R.drawable.mat15);

mat[6].setVisibility(View.VISIBLE);

mat[7].setVisibility(View.VISIBLE);

mat[8].setVisibility(View.VISIBLE);

mat[9].setVisibility(View.VISIBLE);

mat[10].setVisibility(View.VISIBLE);

}

private void mat_button1_page2() {

matpage[1].setVisibility(View.VISIBLE);

matpage[2].setVisibility(View.VISIBLE);

matbutton[1].setImageResource(R.drawable.mat_menu1_button_pressed);

matpage[2].setImageResource(R.drawable.page2_pressed);

mat[1].setImageResource(R.drawable.mat19);

mat[2].setImageResource(R.drawable.mat20);

mat[3].setImageResource(R.drawable.mat21);

mat[4].setImageResource(R.drawable.mat26);

mat[5].setImageResource(R.drawable.mat28);

mat[6].setImageResource(R.drawable.mat30);

mat[7].setImageResource(R.drawable.mat31);

mat[8].setImageResource(R.drawable.mat32);

mat[9].setImageResource(R.drawable.mat33);

mat[10].setImageResource(0);

mat[6].setVisibility(View.VISIBLE);

mat[7].setVisibility(View.VISIBLE);

mat[8].setVisibility(View.VISIBLE);

mat[9].setVisibility(View.VISIBLE);

mat[10].setVisibility(View.GONE);

}

private void mat_button2() {

matpage[1].setVisibility(View.INVISIBLE);

matpage[2].setVisibility(View.INVISIBLE);

matbutton[2].setImageResource(R.drawable.mat_menu2_button_pressed);

mat[1].setImageResource(R.drawable.mat7);

mat[2].setImageResource(R.drawable.mat8);

mat[3].setImageResource(R.drawable.mat13);

mat[4].setImageResource(R.drawable.mat14);

mat[5].setImageResource(R.drawable.mat22);

mat[6].setImageResource(R.drawable.mat24);

mat[7].setImageResource(R.drawable.mat25);

mat[8].setImageResource(R.drawable.mat27);

mat[9].setImageResource(R.drawable.mat29);

mat[10].setImageResource(R.drawable.mat34);

mat[6].setVisibility(View.VISIBLE);

mat[7].setVisibility(View.VISIBLE);

mat[8].setVisibility(View.VISIBLE);

mat[9].setVisibility(View.VISIBLE);

mat[10].setVisibility(View.VISIBLE);

}

private void mat_button3() {

matpage[1].setVisibility(View.INVISIBLE);

matpage[2].setVisibility(View.INVISIBLE);

matbutton[3].setImageResource(R.drawable.mat_menu3_button_pressed);

mat[1].setImageResource(R.drawable.mat12);

mat[2].setImageResource(R.drawable.mat16);

mat[3].setImageResource(R.drawable.mat17);

mat[4].setImageResource(R.drawable.mat18);

mat[5].setImageResource(R.drawable.mat23);

mat[6].setImageResource(0);

mat[7].setImageResource(0);

mat[8].setImageResource(0);

mat[9].setImageResource(0);

mat[10].setImageResource(0);

mat[6].setVisibility(View.GONE);

mat[7].setVisibility(View.GONE);

mat[8].setVisibility(View.GONE);

mat[9].setVisibility(View.GONE);

mat[10].setVisibility(View.GONE);

    }

 

 

 


private void footprint() {

footprint[1].setImageResource(R.drawable.foot1);

footprint[2].setImageResource(R.drawable.foot2);

footprint[3].setImageResource(R.drawable.foot3);

footprint[4].setImageResource(R.drawable.foot4);

footprint[5].setImageResource(R.drawable.foot5);

footprint[6].setImageResource(R.drawable.foot6);

footprint[7].setImageResource(R.drawable.foot7);

footprint[8].setImageResource(R.drawable.foot8);

footprint[9].setImageResource(R.drawable.foot9);

}

private void transport_button() {

transportbutton[1].setImageResource(R.drawable.spd25);

transportbutton[2].setImageResource(R.drawable.spd40);

transportbutton[3].setImageResource(R.drawable.spd42);

transportbutton[4].setImageResource(R.drawable.spd45);

transportbutton[5].setImageResource(R.drawable.spd46);

transportbutton[6].setImageResource(R.drawable.spd48);

}

private void transport_page() {

transportpage[1].setImageResource(R.drawable.page1);

transportpage[2].setImageResource(R.drawable.page2);

transportpage[3].setImageResource(R.drawable.page3);

}

private void transport() {

transport_button();

transport_button1();

transportbutton[1].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_button1();

}

});

transportbutton[2].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_button2();

}

});

transportbutton[3].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_button3();

}

});

transportbutton[4].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_page();

transport_button4_page1();

}

});

transportbutton[5].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_button5();

}

});

transportbutton[6].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_button6();

}

});

transportpage[1].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_page();

transport_button4_page1();

}

});

transportpage[2].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_page();

transport_button4_page2();

}

});

transportpage[3].setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

scroll[2].post(new Runnable() {

            @Override

            public void run() {

             scroll[2].fullScroll(ScrollView.FOCUS_UP);

            }

        });

transport_button();

transport_page();

transport_button4_page3();

}

});

}

private void transport_button1() { //25

transportpage[1].setVisibility(View.INVISIBLE);

transportpage[2].setVisibility(View.INVISIBLE);

transportpage[3].setVisibility(View.INVISIBLE);

transportbutton[1].setImageResource(R.drawable.spd25_pressed);

transport[1].setImageResource(R.drawable.spd25_1);

transport[2].setImageResource(R.drawable.spd25_2);

transport[3].setImageResource(R.drawable.spd25_3);

transport[4].setImageResource(R.drawable.spd25_4);

transport[5].setImageResource(0);

transport[6].setImageResource(0);

transport[7].setImageResource(0);

transport[8].setImageResource(0);

transport[9].setImageResource(0);

transport[10].setImageResource(0);

transport[3].setVisibility(View.VISIBLE);

transport[4].setVisibility(View.VISIBLE);

transport[5].setVisibility(View.GONE);

transport[6].setVisibility(View.GONE);

transport[7].setVisibility(View.GONE);

transport[8].setVisibility(View.GONE);

transport[9].setVisibility(View.GONE);

transport[10].setVisibility(View.GONE);

}

private void transport_button2() { //40

transportpage[1].setVisibility(View.INVISIBLE);

transportpage[2].setVisibility(View.INVISIBLE);

transportpage[3].setVisibility(View.INVISIBLE);

transportbutton[2].setImageResource(R.drawable.spd40_pressed);

transport[1].setImageResource(R.drawable.spd40_1);

transport[2].setImageResource(R.drawable.spd40_2);

transport[3].setImageResource(R.drawable.spd40_3);

transport[4].setImageResource(R.drawable.spd40_4);

transport[5].setImageResource(R.drawable.spd40_5);

transport[6].setImageResource(R.drawable.spd40_6);

transport[7].setImageResource(0);

transport[8].setImageResource(0);

transport[9].setImageResource(0);

transport[10].setImageResource(0);

transport[3].setVisibility(View.VISIBLE);

transport[4].setVisibility(View.VISIBLE);

transport[5].setVisibility(View.VISIBLE);

transport[6].setVisibility(View.VISIBLE);

transport[7].setVisibility(View.GONE);

transport[8].setVisibility(View.GONE);

transport[9].setVisibility(View.GONE);

transport[10].setVisibility(View.GONE);

}

private void transport_button3() { //42

transportpage[1].setVisibility(View.INVISIBLE);

transportpage[2].setVisibility(View.INVISIBLE);

transportpage[3].setVisibility(View.INVISIBLE);

transportbutton[3].setImageResource(R.drawable.spd42_pressed);

transport[1].setImageResource(R.drawable.spd42_1);

transport[2].setImageResource(R.drawable.spd42_2);

transport[3].setImageResource(R.drawable.spd42_3);

transport[4].setImageResource(0);

transport[5].setImageResource(0);

transport[6].setImageResource(0);

transport[7].setImageResource(0);

transport[8].setImageResource(0);

transport[9].setImageResource(0);

transport[10].setImageResource(0);

transport[3].setVisibility(View.VISIBLE);

transport[4].setVisibility(View.GONE);

transport[5].setVisibility(View.GONE);

transport[6].setVisibility(View.GONE);

transport[7].setVisibility(View.GONE);

transport[8].setVisibility(View.GONE);

transport[9].setVisibility(View.GONE);

transport[10].setVisibility(View.GONE);

}

private void transport_button4_page1() { //45/1

transportpage[1].setVisibility(View.VISIBLE);

transportpage[2].setVisibility(View.VISIBLE);

transportpage[3].setVisibility(View.VISIBLE);

transportbutton[4].setImageResource(R.drawable.spd45_pressed);

transportpage[1].setImageResource(R.drawable.page1_pressed);

transport[1].setImageResource(R.drawable.spd45_1);

transport[2].setImageResource(R.drawable.spd45_2);

transport[3].setImageResource(R.drawable.spd45_3);

transport[4].setImageResource(R.drawable.spd45_4);

transport[5].setImageResource(R.drawable.spd45_5);

transport[6].setImageResource(R.drawable.spd45_6);

transport[7].setImageResource(R.drawable.spd45_7);

transport[8].setImageResource(R.drawable.spd45_8);

transport[9].setImageResource(R.drawable.spd45_9);

transport[10].setImageResource(R.drawable.spd45_10);

transport[3].setVisibility(View.VISIBLE);

transport[4].setVisibility(View.VISIBLE);

transport[5].setVisibility(View.VISIBLE);

transport[6].setVisibility(View.VISIBLE);

transport[7].setVisibility(View.VISIBLE);

transport[8].setVisibility(View.VISIBLE);

transport[9].setVisibility(View.VISIBLE);

transport[10].setVisibility(View.VISIBLE);

}

private void transport_button4_page2() { //45/2

transportpage[1].setVisibility(View.VISIBLE);

transportpage[2].setVisibility(View.VISIBLE);

transportpage[3].setVisibility(View.VISIBLE);

transportbutton[4].setImageResource(R.drawable.spd45_pressed);

transportpage[2].setImageResource(R.drawable.page2_pressed);

transport[1].setImageResource(R.drawable.spd45_11);

transport[2].setImageResource(R.drawable.spd45_12);

transport[3].setImageResource(R.drawable.spd45_13);

transport[4].setImageResource(R.drawable.spd45_14);

transport[5].setImageResource(R.drawable.spd45_15);

transport[6].setImageResource(R.drawable.spd45_16);

transport[7].setImageResource(R.drawable.spd45_17);

transport[8].setImageResource(R.drawable.spd45_18);

transport[9].setImageResource(R.drawable.spd45_19);

transport[10].setImageResource(R.drawable.spd45_20);

transport[3].setVisibility(View.VISIBLE);

transport[4].setVisibility(View.VISIBLE);

transport[5].setVisibility(View.VISIBLE);

transport[6].setVisibility(View.VISIBLE);

transport[7].setVisibility(View.VISIBLE);

transport[8].setVisibility(View.VISIBLE);

transport[9].setVisibility(View.VISIBLE);

transport[10].setVisibility(View.VISIBLE);

}

private void transport_button4_page3() { //45/3

transportpage[1].setVisibility(View.VISIBLE);

transportpage[2].setVisibility(View.VISIBLE);

transportpage[3].setVisibility(View.VISIBLE);

transportbutton[4].setImageResource(R.drawable.spd45_pressed);

transportpage[3].setImageResource(R.drawable.page3_pressed);

transport[1].setImageResource(R.drawable.spd45_21);

transport[2].setImageResource(R.drawable.spd45_22);

transport[3].setImageResource(R.drawable.spd45_23);

transport[4].setImageResource(R.drawable.spd45_24);

transport[5].setImageResource(R.drawable.spd45_25);

transport[6].setImageResource(R.drawable.spd45_26);

transport[7].setImageResource(0);

transport[8].setImageResource(0);

transport[9].setImageResource(0);

transport[10].setImageResource(0);

transport[3].setVisibility(View.VISIBLE);

transport[4].setVisibility(View.VISIBLE);

transport[5].setVisibility(View.VISIBLE);

transport[6].setVisibility(View.VISIBLE);

transport[7].setVisibility(View.GONE);

transport[8].setVisibility(View.GONE);

transport[9].setVisibility(View.GONE);

transport[10].setVisibility(View.GONE);

}

private void transport_button5() { //46

transportpage[1].setVisibility(View.INVISIBLE);

transportpage[2].setVisibility(View.INVISIBLE);

transportpage[3].setVisibility(View.INVISIBLE);

transportbutton[5].setImageResource(R.drawable.spd46_pressed);

transport[1].setImageResource(R.drawable.spd46_1);

transport[2].setImageResource(R.drawable.spd46_2);

transport[3].setImageResource(0);

transport[4].setImageResource(0);

transport[5].setImageResource(0);

transport[6].setImageResource(0);

transport[7].setImageResource(0);

transport[8].setImageResource(0);

transport[9].setImageResource(0);

transport[10].setImageResource(0);

transport[3].setVisibility(View.GONE);

transport[4].setVisibility(View.GONE);

transport[5].setVisibility(View.GONE);

transport[6].setVisibility(View.GONE);

transport[7].setVisibility(View.GONE);

transport[8].setVisibility(View.GONE);

transport[9].setVisibility(View.GONE);

transport[10].setVisibility(View.GONE);

}

private void transport_button6() { //48

transportpage[1].setVisibility(View.INVISIBLE);

transportpage[2].setVisibility(View.INVISIBLE);

transportpage[3].setVisibility(View.INVISIBLE);

transportbutton[6].setImageResource(R.drawable.spd48_pressed);

transport[1].setImageResource(R.drawable.spd48_1);

transport[2].setImageResource(R.drawable.spd48_2);

transport[3].setImageResource(R.drawable.spd48_3);

transport[4].setImageResource(R.drawable.spd48_4);

transport[5].setImageResource(R.drawable.spd48_5);

transport[6].setImageResource(R.drawable.spd48_6);

transport[7].setImageResource(R.drawable.spd48_7);

transport[8].setImageResource(0);

transport[9].setImageResource(0);

transport[10].setImageResource(0);

transport[3].setVisibility(View.VISIBLE);

transport[4].setVisibility(View.VISIBLE);

transport[5].setVisibility(View.VISIBLE);

transport[6].setVisibility(View.VISIBLE);

transport[7].setVisibility(View.VISIBLE);

transport[8].setVisibility(View.GONE);

transport[9].setVisibility(View.GONE);

transport[10].setVisibility(View.GONE);

}

@Override

public void onDestroy() {

super.onDestroy();


if (adView != null) {

adView.destroy();

adView = null;

}

button = null;

footprint = null;

matbutton = null;

matpage = null;

mat = null;

transportbutton = null;

transportpage = null;

transport = null;

view = null;

scroll = null;

}

private void initAdam() {

// Ad@m sdk 초기화 시작

adView = (AdView) findViewById(R.id.adview);


// 할당 받은 clientId 설정

adView.setClientId("8e37Z5xT145565136d8");


adView.setRequestInterval(12);

adView.setAdCache(false);


// Animation 효과 : 기본 값은 AnimationType.NONE

adView.setAnimationType(AnimationType.FLIP_HORIZONTAL);

}

public void onBackPressed() {

if(view[1].getVisibility() == View.GONE) {

view[1].setVisibility(View.VISIBLE);

view[2].setVisibility(View.GONE);

view[3].setVisibility(View.GONE);

view[4].setVisibility(View.GONE);

view[5].setVisibility(View.GONE);

}else{

finish();

}

}

반응형

이 글을 공유하기

댓글

Designed by JB FACTORY