0

I have created FragmentPagerAdapter that uses a Cursor loaded by a Loader. Everytime there's new stuff in the DB the Loader loads the Cursor into the Activity and I swap the Cursor inside the FragmentPagerAdapter and notifyDataSetChanged().

However I am missing something because nothing changes since no one calls the getItem method of the Adapter again.

Basically the new Cursor contains a new record in position 0. If I am looking at position 0 I would expect a new Fragment to appear in that position.. and the rest to move to the right... right?

Héctor Júdez Sapena
  • 4,821
  • 3
  • 21
  • 30

1 Answers1

0

Ok, since I was looking for FragmentPagerAdapter with Cursor I couldn't find and answer but it has actually been answered here Update ViewPager dynamically?

Community
  • 1
  • 1
Héctor Júdez Sapena
  • 4,821
  • 3
  • 21
  • 30