• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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            View rootView = inflater.inflate(R.layout.fragment_${classToResource(activityClass)}_dummy, container, false);
19            TextView dummyTextView = (TextView) rootView.findViewById(R.id.section_label);
20            dummyTextView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));
21            return rootView;
22        }
23    }
24