@Override public boolean onOptionsItemSelected(MenuItem item) { if (super.onOptionsItemSelected(item)) { return true; } switch (item.getItemId()) { case R.id.action_save: if (mInvalidChecker.isEmptyString( getString(R.string.info), getString(R.string.user_create_empty), mLayout.getUserID())) { return true; } if (mLayout.isOperator()) { if (mInvalidChecker.isEmptyString( getString(R.string.info), getString(R.string.user_create_empty_idpassword), mLayout.getUserLoginID())) { return true; } if (!mUserInfo.password_exist) { if (mPasswordData == null) { mPopup.show( PopupType.ALERT, getString(R.string.info), getString(R.string.user_create_empty_idpassword), null, null, null); return true; } } } if (mInvalidChecker.isInvalidEmail( getString(R.string.info), getString(R.string.invalid_email), mLayout.getEmail())) { return true; } if (mPinData != null && mPinData.length() > 0 && mPinData.length() < 4) { mPopup.show( PopupType.ALERT, getString(R.string.info), getString(R.string.pincount), null, null, null); return true; } UpdateClone(); mPopup.showWait(true); User user = null; try { user = mUserInfo.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); return true; } user.setMyProfile(); mUserDataProvider.modifyMyProfile( TAG, user, mModifyUserListener, mModifyUserErrorListener, null); return true; default: break; } return false; }