I've used two MutableLiveData in the WalletViewModel which hold the Live state(whether currently open or closed) of the SendScreen and the RecieveScreen, to determine in real-time whether they're open or closed.
Using the above states, the onClick properties of the Send and Recieve buttons are handled respectively, and it solves the present issue.
Do review the code and send in your feedbacks.
I've used two MutableLiveData in the WalletViewModel which hold the Live state(whether currently open or closed) of the SendScreen and the RecieveScreen, to determine in real-time whether they're open or closed. Using the above states, the onClick properties of the Send and Recieve buttons are handled respectively, and it solves the present issue. Do review the code and send in your feedbacks.