title: The method add(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, ListViewFragment)
body: <p>I have error in listfragment "The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, ListFragment)" what should i do? cause i can't appear my fragment.</p>
  
  <pre><code>import android.app.Activity;
  import android.content.Intent; 
  import android.net.Uri;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  
  public class MainActivity extends Activity {
  
  
  
  private FadingActionBarHelper mFadingActionBarHelper;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      mFadingActionBarHelper = new FadingActionBarHelper(getActionBar(),
              getResources().getDrawable(R.drawable.actionbar_bg));
  
      if (savedInstanceState == null) {
           getFragmentManager().beginTransaction()
                  .add(R.id.container, new ListViewFragment())
                  .commit();
  
      }
  }
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
  
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
  
      }
      return super.onOptionsItemSelected(item);
  }
  
  public FadingActionBarHelper getFadingActionBarHelper() {
      return mFadingActionBarHelper;
  }
  
  }
  </code></pre>
  
  <p>The problem is that the FragmentTransaction 's .add(int, Fragment) method accept arguments with the second one of type Fragment, however, I have ListFragment which is not acceptable by this method.</p>
  
  <p>So, how to add ListFragment with FragmentTransaction ?</p>
  
  <p>Here ListView Fragement class:</p>
  
  <pre><code>import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.support.v4.app.FragmentActivity;
  import android.support.v4.app.FragmentManager;
  import android.support.v4.app.FragmentPagerAdapter;
  import android.support.v4.view.ViewPager;
  import com.viewpagerindicator.TabPageIndicator;
  
  public class ListViewFragment extends FragmentActivity {
  private static final String[] CONTENT = new String[] { "Recent", "Artists",
          "Albums", "Songs", "Playlists", "Genres", "Hello", "Hii" };
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.fragment_listview);
  
      FragmentPagerAdapter adapter = new GoogleMusicAdapter(
              getSupportFragmentManager());
  
      ViewPager pager = (ViewPager) findViewById(R.id.pager);
      pager.setAdapter(adapter);
  
      TabPageIndicator indicator = (TabPageIndicator) findViewById(R.id.indicator);
      indicator.setViewPager(pager);
  }
  
  class GoogleMusicAdapter extends FragmentPagerAdapter {
      public GoogleMusicAdapter(FragmentManager fm) {
          super(fm);
      }
  
      @Override
      public Fragment getItem(int position) {
          return TestFragment.newInstance(CONTENT[position % CONTENT.length]);
      }
  
      @Override
      public CharSequence getPageTitle(int position) {
          return CONTENT[position % CONTENT.length].toUpperCase();
      }
  
      @Override
      public int getCount() {
          return CONTENT.length;
  
      }
  }
  </code></pre>