title: ViewPager2 + FragmentStateAdapter: change pages
body: <p>I'm using <code>ViewPager2</code> with a <code>FragmentStateAdapter</code>. Something like this,</p>
  <pre><code>   class TicketsPagerAdapter(f: Fragment, private var pages: Int): FragmentStateAdapter(f) {
          override fun getItemCount(): Int {
              return pages
          }
  
          override fun createFragment(position: Int): Fragment {
              return TicketsFragment.newInstance(position)
          }
  
      }
  </code></pre>
  <p>I want to tell the adapter to change it's data set (add a page, remove a page, clear all pages, etc). I've tried calling <code>notifyDataSetChanged</code> and that has no affect.</p>
  <p>Re-creating the adapter and setting the new instance into the <code>ViewPager2</code> <strong>does</strong> work, but that obviously causes the entire view pager + all pages to re-draw themselves.</p>