Tuesday, January 1, 2019

How to set values globally in android

How to set values globally so that i can access from any activity or fragment.



For eg : activity_login.java > user_id need to store globally so every time any section which depends on user_id, checking and pulling data from backend will be easy instead of passing through activity (intent)



Edit :
i do need setter and getter from fragment or activtiy.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...