- compose는 fragment와 같은 개념이라고 생각될 수 있다.
- navigation은 하나의 activity가 여러 개의 fragment, 즉 compose 들과 이동할 때 사용된다.
- 따라서 activity 간의 이동에는 intent를 사용한다.
- compose에서 activity로 이동하려면 속해 있는 activity의 context가 필요하다.
-> 이는 navigate하면서 파라미터로 전해줄 수 있다.
- compose에서 activity로 이동할 때는
startActivity
를 사용한다.
형식은 startActivity(context, intent, bundle)
이다.
- compose에서 LocalContext.current를 통해서 Activity를 받아올 수 있다.
registerForActivityResult
, setResult
는 Activity 안에서만 사용 가능하다.