Aditya Rai
Aditya Rai

Reputation: 139

Using GridView inside View Pager Fragment

How can i refresh the GridView inside a fragment of a view pager?

  1. I have already tried using adapter.notifyDatasetChanged() , but that's not working .
  2. I want to delete the elements from gridView and refresh the grid view.
  3. I am removing the elements from the arrayList and gridvIew.getCount() shows decreased values but it shows the deleted values in grid view , How can I update/refresh the gridView ?

The layout of fragement is dynamically created so no fragemt tag to findfragement by id.

Upvotes: 0

Views: 773

Answers (1)

Sunil Pandey
Sunil Pandey

Reputation: 446

Ok while scrolling back to the fragment with grid view repopulate the grid inside viewpager on PageChangeListener

Upvotes: 2

Related Questions