I'm building an android app, and I need to retrieve a list of users from a database. I know how to write the query. I will have back a list of object.
I was wondering how to do this in an efficient way considering that I need that list in 3 activities. I think that repeating the same code for 3 times, in 3 different activities is not optimal.
Thanks
As per you comment you are fetching this user data from server, you can consider following:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.