Home | History | Annotate | Download | only in app_package
      1     /**
      2      * A dummy fragment representing a section of the app, but that simply
      3      * displays dummy text.
      4      */
      5     public static class DummySectionFragment extends Fragment {
      6         /**
      7          * The fragment argument representing the section number for this
      8          * fragment.
      9          */
     10         public static final String ARG_SECTION_NUMBER = "section_number";
     11 
     12         public DummySectionFragment() {
     13         }
     14 
     15         @Override
     16         public View onCreateView(LayoutInflater inflater, ViewGroup container,
     17                 Bundle savedInstanceState) {
     18             // Create a new TextView and set its text to the fragment's section
     19             // number argument value.
     20             TextView textView = new TextView(getActivity());
     21             textView.setGravity(Gravity.CENTER);
     22             textView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));
     23             return textView;
     24         }
     25     }
     26