Zohaib Ghafoor
Zohaib Ghafoor

Reputation: 71

should i save data to static class variable or pass it to activity?

I have a mobile application. I am using listview in my application. I want to update my listview on my listview refresh. So should I use a static variable in model class to save refresh data? or something else?

Upvotes: 1

Views: 340

Answers (1)

user6232354
user6232354

Reputation:

Although. this question is opinion based but here is my opinion. By making this list which definitely is going to be binded with the adapter and making it static is really a bad idea in my opinion since it will be accessible globally. Better pass it to Activity.

Upvotes: 1

Related Questions