When I Login at LoginActivity, I save the user data returned from the user into UserSingleton and transfer it to MainActivity as follows: enter image description here
But why when I use it in SellFragment like this:enter image description here
then in the paragraph: user = UserDataSingleton.getInstance().getUser(); user is null again?
I tried using a User object that I saved in another Activity and it worked fine. I really don’t understand why?
Nhật Minh Hoàng Nguyễn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.