Android Open Source - AndroidViewPagerIndicator Screen Slide Page Fragment






From Project

Back to project page AndroidViewPagerIndicator.

License

The source code is released under:

MIT License

If you think the Android project AndroidViewPagerIndicator listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.efoad.viewpagerindicatorsample;
/*  w w w  .  j  ava 2  s  .  c o m*/
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class ScreenSlidePageFragment extends Fragment {

  private int page;

  @Override
  public void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    Bundle arguments = getArguments();
    if (null != arguments && arguments.getInt("page", -1) != -1) {
      page = arguments.getInt("page");
    }
  } 
  
  @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          ViewGroup rootView = (ViewGroup) inflater.inflate(
                  R.layout.fragment_screen_slide_page, container, false);
          ((TextView)rootView.findViewById(R.id.txt_number)).setText(""+page);

          return rootView;
      }
}




Java Source Code List

com.efoad.viewpagerindicatorsample.MainActivity.java
com.efoad.viewpagerindicatorsample.ScreenSlidePageFragment.java
com.efoad.views.ViewPagerIndicator.java