List of usage examples for android.support.v4.app FragmentActivity supportInvalidateOptionsMenu
public void supportInvalidateOptionsMenu()
From source file:it.imwatch.nfclottery.DropboxOptionsFragment.java
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { final FragmentActivity activity = getActivity(); if (activity != null) { if (requestCode == REQUEST_LINK_TO_DBX) { if (resultCode == Activity.RESULT_OK) { Log.d(TAG, "Dropbox account successfully linked"); showFeedback(activity, "Dropbox account successfully linked", Style.CONFIRM); mActionDropboxMenuItem.setTitle(R.string.action_dropbox_unlink); } else { Log.e(TAG, "Link failed or cancelled by the user"); }//ww w . j a v a 2 s . co m } else { super.onActivityResult(requestCode, resultCode, data); } activity.supportInvalidateOptionsMenu(); } else { Log.e(TAG, String.format( "Not attached to an Activity: unable to handle an Activity result " + "(request %d, result %d)", requestCode, resultCode)); } }