I am trying to use DialogFragment in MVVM architecture but I cannot find the answers to some questions.
Should I use the @AndroidEntryPoint annotion? Like this:
@AndroidEntryPoint class MyDialogFragment(): DialogFragment() { }How should I provide the viewModel? Should DialogFragment have its own viewModel? Or is it better to use Fragment's viewModel? Like this:
val viewModel: FragmentViewModel by viewModels()OR
val viewModel: DialogFragmentViewModel by viewModels()How should I communicate with the fragment I have called DialogFragment for?