Android custom dialog with MVVM
问题 I am creating custom dialog and i want when the user click add button go and call retrofit and observe on changes but i don't know how to pass lifecycleowner to the observer private void observeViewModel(ProjectListViewModel viewModel) { // Update the list when the data changes viewModel.getProjectListObservable().observe( ***what to pass here ??*** , new Observer<List<Project>>() { @Override public void onChanged(@Nullable List<Project> projects) { if (projects != null) { //… projectAdapter