Back to project page Grocery-List.
The source code is released under:
MIT License
If you think the Android project Grocery-List listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.evanwaldron.grocerylist.ui; // ww w. j a v a 2 s.c o m import android.app.ListFragment; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.widget.CursorAdapter; import com.evanwaldron.grocerylist.R; /** * Created by Evan on 9/27/14 10:52 PM. */ public class GroceryListFragment extends ListFragment { private CursorAdapter mAdapter; @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setHasOptionsMenu(true); } @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){ inflater.inflate(R.menu.grocery_list, menu); } @Override public boolean onOptionsItemSelected(MenuItem item){ switch(item.getItemId()){ case R.id.action_add: return true; } return super.onOptionsItemSelected(item); } }