title: Android FragmentPagerAdapter is deprecated
body: <p>I have a warning: FragmentPagerAdapter is deprecated.
  Here my code:</p>
  
  <pre><code>package com.sweetieapps.librarianpro;
  
  import androidx.annotation.NonNull;
  import androidx.annotation.Nullable;
  import androidx.fragment.app.Fragment;
  import androidx.fragment.app.FragmentManager;
  import androidx.fragment.app.FragmentPagerAdapter;
  import java.util.ArrayList;
  import java.util.List;
  
  public class ViewPagerAdapter extends FragmentPagerAdapter {
  
      private final List&lt;Fragment&gt; fragmentList = new ArrayList&lt;&gt;();
      private final List&lt;String&gt; fragmentListTitles = new ArrayList&lt;&gt;();
  
      ViewPagerAdapter(FragmentManager fm) {
          super(fm);
      }
  
      @NonNull
      @Override
      public Fragment getItem(int i) {
          return fragmentList.get(i);
      }
  
      @Override
      public int getCount() {
          return fragmentListTitles.size();
      }
  
      @Nullable
      @Override
      public CharSequence getPageTitle(int position) {
          return fragmentListTitles.get(position);
      }
  
      void addFragment(Fragment fragment, String title){
          fragmentList.add(fragment);
          fragmentListTitles.add(title);
      }
  }
  </code></pre>
  
  <p>I found a possible solution here: <a href="https://stackoverflow.com/questions/56778106/fragmentpageradapter-deprecated">FragmentPagerAdapter deprecated</a>
  But it's in Kotlin.</p>
  
  <p>The warning  is on the word: <strong>super</strong></p>
  
  <pre><code>//Here
  super(fm);
  </code></pre>