@Override public void loggedIn(User user) { UiUtils.hideKeyboard(mainActivity); Menu menu = mNavigationView.getMenu(); menu.findItem(R.id.drawer_item_logout).setVisible(true); mHeaderLoggedIn.setVisibility(View.VISIBLE); mUsernameLoggedIn.setText(user.getUsername()); }
@Override @NonNull public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setPositiveButton( android.R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) {} }); builder.setTitle( getArguments().getBoolean(KEY_UPDATE_REQUIRED) ? getString(R.string.version_check_update_required) : getString(R.string.version_check_update_optional)); builder.setMessage(getArguments().getString(KEY_UPDATE_MESSAGE)); AlertDialog dialog = builder.create(); dialog.show(); UiUtils.changeDialogTitleColor(dialog); return dialog; }