private void refreshButtonState ( ) { final Activity activity = getActivity ( ) ; if ( activity != null && mSelectedDir != null ) { mBtnConfirm . setEnabled ( isValidFile ( mSelectedDir ) ) ; getActivity ( ) . invalidateOptionsMenu ( ) ; } }
Changes the state of the buttons depending on the currently selected file or folder .