Hi guys. May I know how to miss a `Dialog` after t...
# android
a
Hi guys. May I know how to miss a
Dialog
after the onClick action? The
onClick
action is bound with the
QuoteViewModel
. I would assume the
ViewModel
should not in charge of closing the
Dialog
, since the responsiblity of the ViewModel is to process and manipulate the data.
Copy code
<com.google.android.material.button.MaterialButton
                android:id="@+id/btn_submit_quote"
                ...
                android:onClick="@{(view) -> quoteViewModel.save()}"
                android:text="@string/submit"
                ... />
stackoverflow 3
google 2
n
i think you need to bind it on method in your dialog class who call viewModel, can change dialog to progress if you need and dismiss when save() method finish.