Created
June 13, 2021 08:32
-
-
Save varundwarkani/4eaf941f49cf9c27b2061353faa040c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
SingleLiveEvent is not found, i.e. what gradle dependency need to add SingleLiveEvent ?