public static Bundle create(AppGroupCreationContent appGroupCreationContent) { Bundle webParams = new Bundle(); Utility.putNonEmptyString( webParams, ShareConstants.WEB_DIALOG_PARAM_NAME, appGroupCreationContent.getName()); Utility.putNonEmptyString( webParams, ShareConstants.WEB_DIALOG_PARAM_DESCRIPTION, appGroupCreationContent.getDescription()); AppGroupCreationContent.AppGroupPrivacy privacy = appGroupCreationContent.getAppGroupPrivacy(); if (privacy != null) { Utility.putNonEmptyString( webParams, ShareConstants.WEB_DIALOG_PARAM_PRIVACY, privacy.toString().toLowerCase(Locale.ENGLISH)); } return webParams; }
public static Bundle create(AppGroupCreationContent appGroupCreationContent) { Bundle webParams = new Bundle(); Utility.putNonEmptyString( webParams, ShareConstants.WEB_DIALOG_PARAM_NAME, appGroupCreationContent.getName()); Utility.putNonEmptyString( webParams, ShareConstants.WEB_DIALOG_PARAM_DESCRIPTION, appGroupCreationContent.getDescription()); Utility.putNonEmptyString( webParams, ShareConstants.WEB_DIALOG_PARAM_PRIVACY, appGroupCreationContent .getAppGroupPrivacy().toString().toLowerCase(Locale.ENGLISH)); return webParams; }
@Override public AppCall createAppCall(final AppGroupCreationContent content) { AppCall appCall = createBaseAppCall(); DialogPresenter.setupAppCallForWebDialog( appCall, GAME_GROUP_CREATION_DIALOG, WebDialogParameters.create(content)); return appCall; }
@Override public boolean canShow(final AppGroupCreationContent content) { return true; }
/** * Shows an {@link CreateAppGroupDialog} to create a group with the passed in content, using * the passed in activity. No callback will be invoked. * * @param activity Activity hosting the dialog * @param appGroupCreationContent Content describing the group to be created */ public static void show( final Activity activity, final AppGroupCreationContent appGroupCreationContent) { new CreateAppGroupDialog(activity).show(appGroupCreationContent); }
/** * Shows an {@link CreateAppGroupDialog} to create a group with the passed in content, using * the passed in fragment. No callback will be invoked. * * @param fragment Fragment hosting the dialog * @param appGroupCreationContent Content describing the group to be created */ public static void show( final Fragment fragment, AppGroupCreationContent appGroupCreationContent) { new CreateAppGroupDialog(fragment).show(appGroupCreationContent); }