Code example for ActionBarActivity

import android.widget.Toast; 
 * Demonstrates how fragments can participate in the options menu. 
public class ActionBarFragmentMenu extends ActionBarActivity { 
    MenuFragment mFragment1;
    Menu2Fragment mFragment2;
    CheckBox mCheckBox1;
    CheckBox mCheckBox2;
    CheckBox mCheckBox3;
    CheckBox mHasOptionsMenu;
    CheckBox mMenuVisibility;
    // Update fragment visibility when check boxes are changed. 
    final OnClickListener mClickListener = new OnClickListener() {
        public void onClick(View v) { 
Experience pair programming with AI  Get Codota for Java