제가 intent Flag에 대해서 잘못이해하고 있는건지,

생각대로 했는데 잘 안되네요.

 

A --> C --> A

 

의 스택입니다.

 

처음 A에서 C를 call할때

 

Intent intent = new Intent(context, C.class); 

activity.startActivity(intent);

 

두번째 C에서 A를 다시 call할때

 

Intent intent = new Intent(this, A.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);

 

이렇게 했습니다.

 

제 예상으로는 다시 A를 call할때 A의 onCreate가 불리지 않게 하려고 저렇게 한건데,

A --> C --> A 에서 다시 A를 call할때 A의 onCreate가 불리는군요..

제 생각으로는 onResume이 불려야할것 같은데..왜 새로 생성할까요??

 

다시 생성하지 않고 stack에 있는것을 사용하려면 어떻게 해야할까요?