content: package me.angeldevil.autoscrollviewpager.demo;
  
  
  import android.graphics.Color;
  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 TextFragment extends Fragment {
      private static final String ARG_PARAM1 = "param1";
  
      private String mParam1;
  
      public static TextFragment newInstance(String param1) {
          TextFragment fragment = new TextFragment();
          Bundle args = new Bundle();
          args.putString(ARG_PARAM1, param1);
          fragment.setArguments(args);
          return fragment;
      }
      public TextFragment() {
          // Required empty public constructor
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          if (getArguments() != null) {
              mParam1 = getArguments().getString(ARG_PARAM1);
          }
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          return inflater.inflate(R.layout.fragment_text, container, false);
      }
  
      @Override
      public void onViewCreated(View view, Bundle savedInstanceState) {
          super.onViewCreated(view, savedInstanceState);
          TextView tv = (TextView) getView().findViewById(R.id.text);
          tv.setText(mParam1);
      }
  
  }
  