[Android] - 개념/Intent

Intent를 이용해 Layout 띄우기

농부지기 2016. 12. 4. 15:58

[ Intent를 이용해 Layout 띄우기 ]

 

1. onClickLinstener()  안 에서 Layout 띄우기

   (즉, 클릭 Event에서 Layout 띄우기)

   - Intent intent = new Intent(getBaseContext(), AnotherActivity1.class);

   - Intent intent = new Intent(getApplicationContext(), AnotherActivity1.class);

   - Event에서는 Context()를 사용해야 됨.

     Event에서는 this를 사용할 수 없음.

 

2. ??

    Intent intent = new Intent(this AnotherActivity1.class);