Reputation: 784
I have an Activity that hosts a GridView. When the Activity is resumed, in the OnResume method, I want to update the UI of some item views (but not all) of the GridView because their underlying data has changed. I know that the GridView has the invalidateViews()
method, but that is overkill because it recreates all views. In my case, I just want to update some views.
Is there an efficient way to achieve this?
Thanks
Upvotes: 0
Views: 68
Reputation:
After changing the data of gridview call adpter with notifydatachanged() after that only it update the gridview with fresh dara
adapter.notifyDataSetChanged();
If you use invalidate views it will create view again
Upvotes: 1