title: Can't use androidx.fragment.app.FragmentManager in ViewPager2
body: <p>Android Studio 3.6</p>
  
  <p>I want to use ViewPager2 with <strong>Fragments</strong> (swipe elements)</p>
  
  <p>app/build.gradle:</p>
  
  <pre><code>implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') { transitive = true; }
      implementation 'androidx.appcompat:appcompat:1.1.0'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'com.google.android.material:material:1.1.0-beta01'
      implementation 'org.altbeacon:android-beacon-library:2.16.3'
      implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
      implementation 'androidx.viewpager2:viewpager2:1.0.0-beta05'
  </code></pre>
  
  <p>In my custom adapter I try this:</p>
  
  <pre><code>import androidx.fragment.app.Fragment
  import androidx.fragment.app.FragmentManager
  import androidx.viewpager2.adapter.FragmentStateAdapter
  import com.myproject.fragment.UserFragment
  
  class UserAdapter(private val userList: ArrayList&lt;String&gt;, fragmentManger: FragmentManager) :
      FragmentStateAdapter(fragmentManger) {
  
      override fun getItem(position: Int): Fragment {
          return UserFragment.getInstance(userList[position])
      }
  
      override fun getItemCount(): Int {
          return userList.size
      }
  }
  </code></pre>
  
  <p>but I get two errors:</p>
  
  <pre><code>Class 'UserAdapter' is not abstract and does not implement abstract base class member @NonNull public abstract fun createFragment(p0: Int): Fragment defined in androidx.viewpager2.adapter.FragmentStateAdapter
  
  None of the following functions can be called with the arguments supplied:
  public constructor FragmentStateAdapter(@NonNull p0: Fragment) defined in androidx.viewpager2.adapter.FragmentStateAdapter
  public constructor FragmentStateAdapter(@NonNull p0: FragmentActivity) defined in androidx.viewpager2.adapter.FragmentStateAdapter
  </code></pre>
  
  <p>and second error:</p>
  
  <pre><code>'getItem' overrides nothing
  </code></pre>
  
  <p>What is wrong with my code?</p>