title: ListView and Tabwidget in Fragment
body: <p>Below is a part of my code:</p>
  
  <pre><code>Fragment fragment = null;
          switch (position) {
          case 0:
              fragment = new HomeFragment();
              break;
          case 1:
              fragment = new FindPeopleFragment();
              break;
          case 2:
              fragment = new PhotosFragment();
              break;
          case 3:
              fragment = new CommunityFragment();
              break;
          case 4:
              fragment = new PagesFragment();
              break;
          case 5:
              fragment = new WhatsHotFragment();
              break;
  
          default:
              break;
          }
  
          if (fragment != null) {
              FragmentManager fragmentManager = getFragmentManager();
              fragmentManager.beginTransaction()
                      .replace(R.id.frame_container, fragment).commit();
  
              // update selected item and title, then close the drawer
              mDrawerList.setItemChecked(position, true);
              mDrawerList.setSelection(position);
              setTitle(navMenuTitles[position]);
              mDrawerLayout.closeDrawer(mDrawerList);
          } else {
              // error in creating fragment
              Log.e("MainActivity", "Error in creating fragment");
          }
  </code></pre>
  
  <p>How do i make HomeFragment listview or tab widget.</p>
  
  <pre><code>import android.app.Fragment;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  
  public class HomeFragment extends Fragment {
  
      public HomeFragment(){}
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
  
          View rootView = inflater.inflate(R.layout.tabs_scroll, container, false);
          return rootView;
      }
  }
  </code></pre>
  
  <p>if i should extends listfragment, the line:</p>
  
  <pre><code>fragmentManager.beginTransaction()
                          .replace(R.id.frame_container, fragment).commit();
  </code></pre>
  
  <p>flag an error: <code>"The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, HomeFragment)"</code></p>
  
  <p>please, how do i make this work, and how do i still add a tab widget assuming i do not want to make it listview</p>