コード例 #1
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Create the adapter that will return a fragment for each of the three
    // primary sections of the app.
    mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager());

    mUiView =
        new FoodMenuUiView(container, savedInstanceState, mSectionsPagerAdapter, getActivity());

    setHasOptionsMenu(true);

    return mUiView.getView();
  }
コード例 #2
0
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
   return mUiView.onOptionsItemSelected(item) ? true : super.onOptionsItemSelected(item);
 }
コード例 #3
0
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
   mUiView.onCreateOptionsMenu(menu, inflater);
 }