Tasks/src/main/java/com/dummies/tasks/fragment/TaskEditFragment.java
@SuppressLint("AlwaysShowAction")
    @Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
        super.onCreateOptionsMenu(menu, inflater);

        // Create a menu item named "Save" and give it an id of 1.
        // If you have multiple menu items, it's a good practice to
        // create static final ints to name them.
        menu.add(0, MENU_SAVE, 0, R.string.confirm)
                .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
    }
/**
     * Called when Android wants to create the options menu for our
     * activity.  In this case, our options menu is our action bar.
     */
Called when Android wants to create the options menu for our
activity.  In this case, our options menu is our action bar.
Called when Android wants to create the options menu for our activity . In this case our options menu is our action bar .
@SuppressLint("AlwaysShowAction")
    @Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
        super.onCreateOptionsMenu(menu, inflater);
        menu.add(0, MENU_SAVE, 0, R.string.confirm)
                .setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
    }
@ SuppressLint ( "AlwaysShowAction" ) @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { super . onCreateOptionsMenu ( menu , inflater ) ; menu . add ( 0 , MENU_SAVE , 0 , R . string . confirm ) . setShowAsAction ( MenuItem . SHOW_AS_ACTION_ALWAYS ) ; }
Called when Android wants to create the options menu for our
 activity.
Called when Android wants to create the options menu for our activity .
// Create a menu item named "Save" and give it an id of 1. // If you have multiple menu items, it's a good practice to // create static final ints to name them.