title: Fragments not loading in my project
body: <p>I am working with ViewPager with Circle Page Indicator.</p>
  
  <p>And I am following this <a href="http://androidopentutorials.com/android-image-slideshow-using-viewpager/" rel="nofollow noreferrer">link for sample</a></p>
  
  <p>Here in below I mentioned my class details.<img src="https://i.stack.imgur.com/WrKuz.jpg" alt="Folder Structure"></p>
  
  <p><strong>HelpScreen.java</strong></p>
  
  <pre><code>This Activity had one fragment called HelpScreenFragment.java
  
      public class HelpScreen extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.help_screen);
  
          HelpScreenFragment helpScreenFragment = new HelpScreenFragment();
          FragmentTransaction transaction = getFragmentManager()
                  .beginTransaction().add(R.id.frame_helpscreen_container,
                          helpScreenFragment);
          transaction.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.help_screen, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
          if (id == R.id.action_settings) {
              return true;
          }
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p><strong>help_screen.xml</strong></p>
  
  <pre><code>    &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="${relativePackage}.${activityClass}" &gt;
  
      &lt;FrameLayout 
          android:id="@+id/frame_helpscreen_container"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
         /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>SlidePagerAdapter.java</strong>
   This class extends PagerAdapter and used to inflate the</p>
  
  <pre><code>    public class SlidePagerAdapter extends PagerAdapter {
  
      ImageView helpScreenImage;
      List&lt;Integer&gt; drawableBitmap;
      int gallery_grid_Images[] = { R.drawable.sample1, R.drawable.sample2,
              R.drawable.sample3, R.drawable.sample4, R.drawable.sample5, };
  
      private Context mContext;
  
      Activity activity;
  
      public SlidePagerAdapter(Activity mContext) {
          super();
          this.activity = mContext;
      }
  
      @Override
      public int getCount() {
          return 0;
      }
  
      @Override
      public boolean isViewFromObject(View view, Object object) {
          return view == object;
      }
  
      @Override
      public Object instantiateItem(ViewGroup container, int position) {
  
          LayoutInflater inflater = (LayoutInflater) mContext
                  .getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
          View view = inflater.inflate(R.layout.viewpager_layout, container,
                  false);
          helpScreenImage = (ImageView) view.findViewById(R.id.helpscreen_image);
          helpScreenImage.setImageResource(gallery_grid_Images[position]);
          ((ViewPager) container).addView(helpScreenImage);
  
          return view;
      }
  
      @Override
      public void destroyItem(ViewGroup container, int position, Object object) {
  
          container.removeView((View)object);
      }
  
  }
  </code></pre>
  
  <p><strong>viewpager_layout.xml</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;ImageView
          android:id="@+id/helpscreen_image"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>HelpScreenFragment.java</strong></p>
  
  <pre><code>public class HelpScreenFragment extends Fragment {
  
  ViewPager helpScreenPager;
  
  CirclePageIndicator mCirclePageIndicator;
  
  SlidePagerAdapter mSlidePagerAdapter;
  
  Activity activity;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      activity = getActivity();
  };
  
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
  
      View view = inflater.inflate(R.layout.helpscreen_fragment, container,
              false);
  
      initializeWidgets(view);
  
  
      mSlidePagerAdapter = new SlidePagerAdapter(activity);
  
      helpScreenPager.setAdapter(mSlidePagerAdapter);
      mCirclePageIndicator.setViewPager(helpScreenPager);
  
      return view;
  
  }
  
  private void initializeWidgets(View view) {
  
      helpScreenPager = (ViewPager) view.findViewById(R.id.pager);
  
      mCirclePageIndicator = (CirclePageIndicator) view
              .findViewById(R.id.page_indicator);
  }
  
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
      super.onActivityCreated(savedInstanceState);
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And in helpscreen_fragment.xml contains only ViewPager and CirclePageIndicator</p>
  
  <p><strong>helpscreen_fragment.xml</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res/com.example.viewpagerdemo"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;!--
           &lt;ViewFlipper
          android:id="@+id/helpscreen_flipper"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt; --&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/pager"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;com.example.viewpagerdemo.CirclePageIndicator
          android:id="@+id/page_indicator"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/view_pager"
          android:padding="10dip" /&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>When executing the project I am getting only blank screen. 
  What I did wrong? What changes have to made.
  Could anybody help on this?</p>
  
  <pre><code>  [1]: http://androidopentutorials.com/android-image-slideshow-using-viewpager/
    [2]: http://i.stack.imgur.com/pSold.jpg
  </code></pre>