Skip to content

Instantly share code, notes, and snippets.

@girubhai
Forked from varundwarkani/UPIViewModel.java
Created October 6, 2021 08:15
Show Gist options
  • Save girubhai/d6ba8686e2dceca90a10f6f40852086f to your computer and use it in GitHub Desktop.
Save girubhai/d6ba8686e2dceca90a10f6f40852086f to your computer and use it in GitHub Desktop.
public class UPIViewModel extends ViewModel {
public MutableLiveData<String> upiID = new MutableLiveData<>("");
public SingleLiveEvent<Boolean> isSubmitAction = new SingleLiveEvent<>();
public SingleLiveEvent<Boolean> canSaveData = new SingleLiveEvent<>();
public void onSubmit() {
isSubmitAction.postValue(true);
}
public void onCancel() {
isSubmitAction.postValue(false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment