android.os.Bundle

Here are the examples of the java api class android.os.Bundle taken from open source projects.

1. UserAccountTest#createTestAccountBundle()

Project: SalesforceMobileSDK-Android
File: UserAccountTest.java
/**
     * Creates a test {@link Bundle} with all {@link UserAccount} fields populated
     *
     * @return {@link Bundle}
     */
private Bundle createTestAccountBundle() {
    final Bundle object = new Bundle();
    object.putString(UserAccount.AUTH_TOKEN, TEST_AUTH_TOKEN);
    object.putString(UserAccount.REFRESH_TOKEN, TEST_REFRESH_TOKEN);
    object.putString(UserAccount.LOGIN_SERVER, TEST_LOGIN_URL);
    object.putString(UserAccount.ID_URL, TEST_IDENTITY_URL);
    object.putString(UserAccount.INSTANCE_SERVER, TEST_INSTANCE_URL);
    object.putString(UserAccount.ORG_ID, TEST_ORG_ID);
    object.putString(UserAccount.USER_ID, TEST_USER_ID);
    object.putString(UserAccount.USERNAME, TEST_USERNAME);
    object.putString(UserAccount.CLIENT_ID, TEST_CLIENT_ID);
    object.putString(UserAccount.ACCOUNT_NAME, TEST_ACCOUNT_NAME);
    object.putString(UserAccount.COMMUNITY_ID, TEST_COMMUNITY_ID);
    object.putString(UserAccount.COMMUNITY_URL, TEST_COMMUNITY_URL);
    object.putString(UserAccount.FIRST_NAME, TEST_FIRST_NAME);
    object.putString(UserAccount.LAST_NAME, TEST_LAST_NAME);
    object.putString(UserAccount.DISPLAY_NAME, TEST_DISPLAY_NAME);
    object.putString(UserAccount.EMAIL, TEST_EMAIL);
    object.putString(UserAccount.PHOTO_URL, TEST_PHOTO_URL);
    object.putString(UserAccount.THUMBNAIL_URL, TEST_THUMBNAIL_URL);
    return object;
}

2. UserAccount#toBundle()

Project: SalesforceMobileSDK-Android
File: UserAccount.java
/**
     * Returns a representation of this instance in a bundle.
     *
     * @return Bundle instance.
     */
public Bundle toBundle() {
    final Bundle object = new Bundle();
    object.putString(AUTH_TOKEN, authToken);
    object.putString(REFRESH_TOKEN, refreshToken);
    object.putString(LOGIN_SERVER, loginServer);
    object.putString(ID_URL, idUrl);
    object.putString(INSTANCE_SERVER, instanceServer);
    object.putString(ORG_ID, orgId);
    object.putString(USER_ID, userId);
    object.putString(USERNAME, username);
    object.putString(CLIENT_ID, clientId);
    object.putString(ACCOUNT_NAME, accountName);
    object.putString(COMMUNITY_ID, communityId);
    object.putString(COMMUNITY_URL, communityUrl);
    object.putString(FIRST_NAME, firstName);
    object.putString(LAST_NAME, lastName);
    object.putString(DISPLAY_NAME, displayName);
    object.putString(EMAIL, email);
    object.putString(PHOTO_URL, photoUrl);
    object.putString(THUMBNAIL_URL, thumbnailUrl);
    return object;
}

3. ArrowDownloadButton#onSaveInstanceState()

Project: ArrowDownloadButton
File: ArrowDownloadButton.java
@Override
protected Parcelable onSaveInstanceState() {
    final Bundle bundle = new Bundle();
    bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
    bundle.putFloat(X_I, x);
    bundle.putFloat(Y_I, y);
    bundle.putFloat(RADIUS_I, radius);
    bundle.putFloat(MAX_WAVE_HEIGHT_I, maxWaveHeight);
    bundle.putFloat(MIN_WAVE_HEIGHT_I, minWaveHeight);
    bundle.putFloat(TEXT_Y_I, textY);
    bundle.putFloat(STEP_I, step);
    bundle.putFloat(ELASTICITY_STEP_I, elasticityStep);
    bundle.putFloat(ROPE_STEP_X_I, ropeStepX);
    bundle.putFloat(ROPE_STEP_Y_I, ropeStepY);
    bundle.putFloat(ROPE_HEAD_STEP_Y_I, ropeHeadStepY);
    bundle.putFloat(JUMP_STEP_I, jumpStep);
    bundle.putFloat(DOWN_STEP_I, downStep);
    bundle.putFloat(TRI_STEP_I, triStep);
    bundle.putFloat(HOOK_STEP_Y_I, hookStepY);
    bundle.putFloat(LITTLE_STEP_I, littleStep);
    bundle.putFloat(SMALL_RADIUS_I, smallRadius);
    bundle.putFloat(TEXT_SIZE_I, textSize);
    bundle.putFloat(ARC_WIDTH_I, arcWidth);
    bundle.putFloat(ARROW_WIDTH_I, arrowWidth);
    bundle.putFloat(TRI_WIDTH_I, triWidth);
    bundle.putFloat(LOADING_WIDTH_I, loadingWidth);
    bundle.putBoolean(IS_FIRST_I, isFirst);
    bundle.putBoolean(IS_ANIMATING_I, isAnimating);
    bundle.putBoolean(BEZIER_I, bezier);
    bundle.putBoolean(IS_LOADING_I, isLoading);
    bundle.putBoolean(IS_COMPLETED_I, isCompleted);
    bundle.putBoolean(IS_END_I, isEnd);
    bundle.putInt(COUNT_I, count);
    bundle.putFloat(LENGTH_I, length);
    bundle.putInt(CURRENT_TIME_I, currentTime);
    bundle.putFloat(WAVE_HEIGHT_I, waveHeight);
    bundle.putFloat(PROGRESS_I, progress);
    bundle.putInt(HOOK_COUNT_I, hookCount);
    bundle.putFloat(LENGTH_X_I, lengthX);
    bundle.putFloat(LENGTH_Y_I, lengthY);
    return bundle;
}

4. CircularBar#onSaveInstanceState()

Project: CircularBarPager
File: CircularBar.java
@Override
protected Parcelable onSaveInstanceState() {
    final Bundle bundle = new Bundle();
    bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
    bundle.putBoolean(INSTANCE_START_LINE_ENABLED, isStartLineEnabled());
    bundle.putFloat(INSTANCE_CLOCKWISE_REACHED_BAR_HEIGHT, getClockwiseReachedArcWidth());
    bundle.putFloat(INSTANCE_CLOCKWISE_OUTLINE_BAR_HEIGHT, getClockwiseOutlineArcWidth());
    bundle.putInt(INSTANCE_CLOCKWISE_REACHED_BAR_COLOR, getClockwiseReachedArcColor());
    bundle.putInt(INSTANCE_CLOCKWISE_OUTLINE_BAR_COLOR, getClockwiseOutlineArcColor());
    bundle.putFloat(INSTANCE_COUNTER_CLOCKWISE_REACHED_BAR_HEIGHT, getCounterClockwiseReachedArcWidth());
    bundle.putFloat(INSTANCE_COUNTER_CLOCKWISE_OUTLINE_BAR_HEIGHT, getCounterClockwiseOutlineArcWidth());
    bundle.putInt(INSTANCE_COUNTER_CLOCKWISE_REACHED_BAR_COLOR, getCounterClockwiseReachedArcColor());
    bundle.putInt(INSTANCE_COUNTER_CLOCKWISE_OUTLINE_BAR_COLOR, getCounterClockwiseOutlineArcColor());
    bundle.putBoolean(INSTANCE_CIRCLE_FILL_ENABLED, isCircleFillEnabled());
    bundle.putInt(INSTANCE_CIRCLE_FILL_COLOR, getCircleFillColor());
    bundle.putInt(INSTANCE_MAX, getMax());
    bundle.putFloat(INSTANCE_PROGRESS, getProgress());
    bundle.putString(INSTANCE_SUFFIX, getSuffix());
    bundle.putString(INSTANCE_PREFIX, getPrefix());
    return bundle;
}

5. SmsMmsMessage#toBundle()

Project: Commandr-Android
File: SmsMmsMessage.java
/**
     * Convert all SmsMmsMessage data to an extras bundle to send via an intent
     */
public Bundle toBundle() {
    Bundle b = new Bundle();
    b.putString(EXTRAS_FROM_ADDRESS, fromAddress);
    b.putString(EXTRAS_MESSAGE_BODY, messageBody);
    b.putLong(EXTRAS_TIMESTAMP, timestamp);
    b.putString(EXTRAS_CONTACT_ID, contactId);
    b.putString(EXTRAS_CONTACT_LOOKUP, contactLookupKey);
    b.putString(EXTRAS_CONTACT_NAME, contactName);
    b.putInt(EXTRAS_UNREAD_COUNT, unreadCount);
    b.putLong(EXTRAS_THREAD_ID, threadId);
    b.putInt(EXTRAS_MESSAGE_TYPE, messageType);
    b.putBoolean(EXTRAS_NOTIFY, notify);
    b.putInt(EXTRAS_REMINDER_COUNT, reminderCount);
    b.putLong(EXTRAS_MESSAGE_ID, messageId);
    b.putBoolean(EXTRAS_EMAIL_GATEWAY, fromEmailGateway);
    return b;
}

6. NumberProgressBar#onSaveInstanceState()

Project: NumberProgressBar
File: NumberProgressBar.java
@Override
protected Parcelable onSaveInstanceState() {
    final Bundle bundle = new Bundle();
    bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
    bundle.putInt(INSTANCE_TEXT_COLOR, getTextColor());
    bundle.putFloat(INSTANCE_TEXT_SIZE, getProgressTextSize());
    bundle.putFloat(INSTANCE_REACHED_BAR_HEIGHT, getReachedBarHeight());
    bundle.putFloat(INSTANCE_UNREACHED_BAR_HEIGHT, getUnreachedBarHeight());
    bundle.putInt(INSTANCE_REACHED_BAR_COLOR, getReachedBarColor());
    bundle.putInt(INSTANCE_UNREACHED_BAR_COLOR, getUnreachedBarColor());
    bundle.putInt(INSTANCE_MAX, getMax());
    bundle.putInt(INSTANCE_PROGRESS, getProgress());
    bundle.putString(INSTANCE_SUFFIX, getSuffix());
    bundle.putString(INSTANCE_PREFIX, getPrefix());
    bundle.putBoolean(INSTANCE_TEXT_VISIBILITY, getProgressTextVisibility());
    return bundle;
}

7. SmsMmsMessage#toBundle()

Project: android-xbmcremote
File: SmsMmsMessage.java
/**
	 * Convert all SmsMmsMessage data to an extras bundle to send via an intent
	 */
public Bundle toBundle() {
    Bundle b = new Bundle();
    b.putString(EXTRAS_FROM_ADDRESS, mFromAddress);
    b.putString(EXTRAS_MESSAGE_BODY, mMessageBody);
    b.putLong(EXTRAS_TIMESTAMP, mTimestamp);
    b.putString(EXTRAS_CONTACT_ID, mContactId);
    b.putString(EXTRAS_CONTACT_NAME, mContactName);
    b.putByteArray(EXTRAS_CONTACT_PHOTO, mContactPhoto);
    b.putInt(EXTRAS_UNREAD_COUNT, mUnreadCount);
    b.putLong(EXTRAS_THREAD_ID, mThreadId);
    b.putInt(EXTRAS_MESSAGE_TYPE, mMessageType);
    b.putBoolean(EXTRAS_NOTIFY, mNotify);
    b.putInt(EXTRAS_REMINDER_COUNT, mReminderCount);
    b.putLong(EXTRAS_MESSAGE_ID, mMessageId);
    return b;
}

8. CircularSeekBar#onSaveInstanceState()

Project: circularseekbar
File: CircularSeekBar.java
@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    Bundle state = new Bundle();
    state.putParcelable("PARENT", superState);
    state.putInt("MAX", mMax);
    state.putInt("PROGRESS", mProgress);
    state.putInt("mCircleColor", mCircleColor);
    state.putInt("mCircleProgressColor", mCircleProgressColor);
    state.putInt("mPointerColor", mPointerColor);
    state.putInt("mPointerHaloColor", mPointerHaloColor);
    state.putInt("mPointerHaloColorOnTouch", mPointerHaloColorOnTouch);
    state.putInt("mPointerAlpha", mPointerAlpha);
    state.putInt("mPointerAlphaOnTouch", mPointerAlphaOnTouch);
    state.putBoolean("lockEnabled", lockEnabled);
    state.putBoolean("isTouchEnabled", isTouchEnabled);
    return state;
}

9. TagsEditText#onSaveInstanceState()

Project: TagsEditText
File: TagsEditText.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable(SUPER_STATE, super.onSaveInstanceState());
    Tag[] tags = new Tag[mTags.size()];
    mTags.toArray(tags);
    bundle.putParcelableArray(TAGS, tags);
    bundle.putString(LAST_STRING, mLastString);
    bundle.putString(UNDER_CONSTRUCTION_TAG, getNewTag(getText().toString()));
    bundle.putInt(TAGS_TEXT_COLOR, mTagsTextColor);
    bundle.putInt(TAGS_BACKGROUND_RESOURCE, mTagsBackgroundResource);
    bundle.putFloat(TAGS_TEXT_SIZE, mTagsTextSize);
    bundle.putInt(LEFT_DRAWABLE_RESOURCE, mLeftDrawableResouce);
    bundle.putInt(RIGHT_DRAWABLE_RESOURCE, mRightDrawableResouce);
    bundle.putInt(DRAWABLE_PADDING, mDrawablePadding);
    bundle.putBoolean(ALLOW_SPACES_IN_TAGS, mIsSpacesAllowedInTags);
    return bundle;
}

10. CameraLauncher#onSaveInstanceState()

Project: VallasciApp-ionic
File: CameraLauncher.java
/**
     * Taking or choosing a picture launches another Activity, so we need to implement the
     * save/restore APIs to handle the case where the CordovaActivity is killed by the OS
     * before we get the launched Activity's result.
     */
public Bundle onSaveInstanceState() {
    Bundle state = new Bundle();
    state.putInt("destType", this.destType);
    state.putInt("srcType", this.srcType);
    state.putInt("mQuality", this.mQuality);
    state.putInt("targetWidth", this.targetWidth);
    state.putInt("targetHeight", this.targetHeight);
    state.putInt("encodingType", this.encodingType);
    state.putInt("mediaType", this.mediaType);
    state.putInt("numPics", this.numPics);
    state.putBoolean("allowEdit", this.allowEdit);
    state.putBoolean("correctOrientation", this.correctOrientation);
    state.putBoolean("saveToPhotoAlbum", this.saveToPhotoAlbum);
    if (this.croppedUri != null) {
        state.putString("croppedUri", this.croppedUri.toString());
    }
    if (this.imageUri != null) {
        state.putString("imageUri", this.imageUri.toString());
    }
    return state;
}

11. CircularSeekBar#onSaveInstanceState()

Project: Muzesto
File: CircularSeekBar.java
@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    Bundle state = new Bundle();
    state.putParcelable("PARENT", superState);
    state.putInt("MAX", mMax);
    state.putInt("PROGRESS", mProgress);
    state.putInt("mCircleColor", mCircleColor);
    state.putInt("mCircleProgressColor", mCircleProgressColor);
    state.putInt("mPointerColor", mPointerColor);
    state.putInt("mPointerHaloColor", mPointerHaloColor);
    state.putInt("mPointerHaloColorOnTouch", mPointerHaloColorOnTouch);
    state.putInt("mPointerAlpha", mPointerAlpha);
    state.putInt("mPointerAlphaOnTouch", mPointerAlphaOnTouch);
    state.putBoolean("lockEnabled", lockEnabled);
    return state;
}

12. CameraLauncher#onSaveInstanceState()

Project: Projeto_PG
File: CameraLauncher.java
/**
     * Taking or choosing a picture launches another Activity, so we need to implement the
     * save/restore APIs to handle the case where the CordovaActivity is killed by the OS
     * before we get the launched Activity's result.
     */
public Bundle onSaveInstanceState() {
    Bundle state = new Bundle();
    state.putInt("destType", this.destType);
    state.putInt("srcType", this.srcType);
    state.putInt("mQuality", this.mQuality);
    state.putInt("targetWidth", this.targetWidth);
    state.putInt("targetHeight", this.targetHeight);
    state.putInt("encodingType", this.encodingType);
    state.putInt("mediaType", this.mediaType);
    state.putInt("numPics", this.numPics);
    state.putBoolean("allowEdit", this.allowEdit);
    state.putBoolean("correctOrientation", this.correctOrientation);
    state.putBoolean("saveToPhotoAlbum", this.saveToPhotoAlbum);
    if (this.croppedUri != null) {
        state.putString("croppedUri", this.croppedUri.toString());
    }
    if (this.imageUri != null) {
        state.putString("imageUri", this.imageUri.toString());
    }
    return state;
}

13. CameraLauncher#onSaveInstanceState()

Project: Projeto_PG
File: CameraLauncher.java
/**
     * Taking or choosing a picture launches another Activity, so we need to implement the
     * save/restore APIs to handle the case where the CordovaActivity is killed by the OS
     * before we get the launched Activity's result.
     */
public Bundle onSaveInstanceState() {
    Bundle state = new Bundle();
    state.putInt("destType", this.destType);
    state.putInt("srcType", this.srcType);
    state.putInt("mQuality", this.mQuality);
    state.putInt("targetWidth", this.targetWidth);
    state.putInt("targetHeight", this.targetHeight);
    state.putInt("encodingType", this.encodingType);
    state.putInt("mediaType", this.mediaType);
    state.putInt("numPics", this.numPics);
    state.putBoolean("allowEdit", this.allowEdit);
    state.putBoolean("correctOrientation", this.correctOrientation);
    state.putBoolean("saveToPhotoAlbum", this.saveToPhotoAlbum);
    if (this.croppedUri != null) {
        state.putString("croppedUri", this.croppedUri.toString());
    }
    if (this.imageUri != null) {
        state.putString("imageUri", this.imageUri.toString());
    }
    return state;
}

14. AddonOverviewFragment#newInstance()

Project: Kore
File: AddonOverviewFragment.java
/**
     * Create a new instance of this, initialized to show the addon addonId
     */
@TargetApi(21)
public static AddonOverviewFragment newInstance(AddonListFragment.ViewHolder vh) {
    AddonOverviewFragment fragment = new AddonOverviewFragment();
    Bundle args = new Bundle();
    args.putString(AddonDetailsFragment.BUNDLE_KEY_ADDONID, vh.addonId);
    args.putString(AddonDetailsFragment.BUNDLE_KEY_NAME, vh.addonName);
    args.putString(AddonDetailsFragment.BUNDLE_KEY_AUTHOR, vh.author);
    args.putString(AddonDetailsFragment.BUNDLE_KEY_VERSION, vh.version);
    args.putString(AddonDetailsFragment.BUNDLE_KEY_SUMMARY, vh.summary);
    args.putString(AddonDetailsFragment.BUNDLE_KEY_DESCRIPTION, vh.description);
    args.putString(AddonDetailsFragment.BUNDLE_KEY_FANART, vh.fanart);
    args.putString(AddonDetailsFragment.BUNDLE_KEY_POSTER, vh.poster);
    args.putBoolean(AddonDetailsFragment.BUNDLE_KEY_ENABLED, vh.enabled);
    args.putBoolean(AddonDetailsFragment.BUNDLE_KEY_BROWSABLE, vh.browsable);
    if (Utils.isLollipopOrLater()) {
        args.putString(AddonDetailsFragment.POSTER_TRANS_NAME, vh.artView.getTransitionName());
    }
    fragment.setArguments(args);
    return fragment;
}

15. AddonDetailsFragment#newInstance()

Project: Kore
File: AddonDetailsFragment.java
/**
     * Create a new instance of this, initialized to show the addon addonId
     */
@TargetApi(21)
public static AddonDetailsFragment newInstance(AddonListFragment.ViewHolder vh) {
    AddonDetailsFragment fragment = new AddonDetailsFragment();
    Bundle args = new Bundle();
    args.putString(BUNDLE_KEY_ADDONID, vh.addonId);
    args.putString(BUNDLE_KEY_NAME, vh.addonName);
    args.putString(BUNDLE_KEY_AUTHOR, vh.author);
    args.putString(BUNDLE_KEY_VERSION, vh.version);
    args.putString(BUNDLE_KEY_SUMMARY, vh.summary);
    args.putString(BUNDLE_KEY_DESCRIPTION, vh.description);
    args.putString(BUNDLE_KEY_FANART, vh.fanart);
    args.putString(BUNDLE_KEY_POSTER, vh.poster);
    args.putBoolean(BUNDLE_KEY_ENABLED, vh.enabled);
    args.putBoolean(BUNDLE_KEY_BROWSABLE, vh.browsable);
    if (Utils.isLollipopOrLater()) {
        args.putString(POSTER_TRANS_NAME, vh.artView.getTransitionName());
    }
    fragment.setArguments(args);
    return fragment;
}

16. SublimeBaseMenuItem#saveState()

Project: SublimeNavigationView
File: SublimeBaseMenuItem.java
private Bundle saveState() {
    Bundle bundle = new Bundle();
    bundle.putInt(SS_ID, mId);
    bundle.putInt(SS_GROUP_ID, mGroup);
    bundle.putCharSequence(SS_TITLE, mTitle);
    bundle.putCharSequence(SS_HINT, mHint);
    bundle.putParcelable(SS_INTENT, mIntent);
    bundle.putBoolean(SS_SHOWS_ICON_SPACE, mShowsIconSpace);
    bundle.putString(SS_ITEM_TYPE, mItemType.name());
    bundle.putBoolean(SS_VALUE_PROVIDED_ASYNC, mValueProvidedAsync);
    bundle.putInt(SS_ICON_RES_ID, mIconResId);
    bundle.putInt(SS_FLAGS, mFlags);
    return bundle;
}

17. CircularSeekBar#onSaveInstanceState()

Project: androidclient
File: CircularSeekBar.java
@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    Bundle state = new Bundle();
    state.putParcelable("PARENT", superState);
    state.putFloat("MAX", mMax);
    state.putFloat("PROGRESS", mProgress);
    state.putInt("mCircleColor", mCircleColor);
    state.putInt("mCircleProgressColor", mCircleProgressColor);
    state.putInt("mPointerColor", mPointerColor);
    state.putInt("mPointerHaloColor", mPointerHaloColor);
    state.putInt("mPointerAlpha", mPointerAlpha);
    state.putInt("mPointerAlphaOnTouch", mPointerAlphaOnTouch);
    return state;
}

18. SiteSettingsFragment#showCloseAfterDialog()

Project: WordPress-Android
File: SiteSettingsFragment.java
private void showCloseAfterDialog() {
    Bundle args = new Bundle();
    args.putBoolean(NumberPickerDialog.SHOW_SWITCH_KEY, true);
    args.putBoolean(NumberPickerDialog.SWITCH_ENABLED_KEY, mSiteSettings.getShouldCloseAfter());
    args.putString(NumberPickerDialog.SWITCH_TITLE_KEY, getString(R.string.site_settings_close_after_dialog_switch_text));
    args.putString(NumberPickerDialog.SWITCH_DESC_KEY, getString(R.string.site_settings_close_after_dialog_description));
    args.putString(NumberPickerDialog.TITLE_KEY, getString(R.string.site_settings_close_after_dialog_title));
    args.putString(NumberPickerDialog.HEADER_TEXT_KEY, getString(R.string.site_settings_close_after_dialog_header));
    args.putInt(NumberPickerDialog.MIN_VALUE_KEY, 1);
    args.putInt(NumberPickerDialog.MAX_VALUE_KEY, getResources().getInteger(R.integer.close_after_limit));
    args.putInt(NumberPickerDialog.CUR_VALUE_KEY, mSiteSettings.getCloseAfter());
    showNumberPickerDialog(args, CLOSE_AFTER_REQUEST_CODE, "close-after-dialog");
}

19. SiteSettingsFragment#showThreadingDialog()

Project: WordPress-Android
File: SiteSettingsFragment.java
private void showThreadingDialog() {
    Bundle args = new Bundle();
    args.putBoolean(NumberPickerDialog.SHOW_SWITCH_KEY, true);
    args.putBoolean(NumberPickerDialog.SWITCH_ENABLED_KEY, mSiteSettings.getShouldThreadComments());
    args.putString(NumberPickerDialog.SWITCH_TITLE_KEY, getString(R.string.site_settings_threading_title));
    args.putString(NumberPickerDialog.SWITCH_DESC_KEY, getString(R.string.site_settings_threading_dialog_description));
    args.putString(NumberPickerDialog.TITLE_KEY, getString(R.string.site_settings_threading_title));
    args.putString(NumberPickerDialog.HEADER_TEXT_KEY, getString(R.string.site_settings_threading_dialog_header));
    args.putInt(NumberPickerDialog.MIN_VALUE_KEY, 2);
    args.putInt(NumberPickerDialog.MAX_VALUE_KEY, getResources().getInteger(R.integer.threading_limit));
    args.putInt(NumberPickerDialog.CUR_VALUE_KEY, mSiteSettings.getThreadingLevels());
    showNumberPickerDialog(args, THREADING_REQUEST_CODE, "threading-dialog", new Formatter() {

        @Override
        public String format(int value) {
            return mSiteSettings.getThreadingDescriptionForLevel(value);
        }
    });
}

20. SiteSettingsFragment#showPagingDialog()

Project: WordPress-Android
File: SiteSettingsFragment.java
private void showPagingDialog() {
    Bundle args = new Bundle();
    args.putBoolean(NumberPickerDialog.SHOW_SWITCH_KEY, true);
    args.putBoolean(NumberPickerDialog.SWITCH_ENABLED_KEY, mSiteSettings.getShouldPageComments());
    args.putString(NumberPickerDialog.SWITCH_TITLE_KEY, getString(R.string.site_settings_paging_title));
    args.putString(NumberPickerDialog.SWITCH_DESC_KEY, getString(R.string.site_settings_paging_dialog_description));
    args.putString(NumberPickerDialog.TITLE_KEY, getString(R.string.site_settings_paging_title));
    args.putString(NumberPickerDialog.HEADER_TEXT_KEY, getString(R.string.site_settings_paging_dialog_header));
    args.putInt(NumberPickerDialog.MIN_VALUE_KEY, 1);
    args.putInt(NumberPickerDialog.MAX_VALUE_KEY, getResources().getInteger(R.integer.paging_limit));
    args.putInt(NumberPickerDialog.CUR_VALUE_KEY, mSiteSettings.getPagingCount());
    showNumberPickerDialog(args, PAGING_REQUEST_CODE, "paging-dialog");
}

21. SignInDialogFragment#newInstance()

Project: WordPress-Android
File: SignInDialogFragment.java
public static SignInDialogFragment newInstance(String title, String message, int imageSource, int numberOfButtons, String firstButtonLabel, String secondButtonLabel, String thirdButtonLabel, int secondButtonAction, int thirdButtonAction) {
    SignInDialogFragment adf = new SignInDialogFragment();
    Bundle bundle = new Bundle();
    bundle.putString(ARG_TITLE, title);
    bundle.putString(ARG_DESCRIPTION, message);
    bundle.putInt(ARG_IMAGE, imageSource);
    bundle.putInt(ARG_NUMBER_OF_BUTTONS, numberOfButtons);
    bundle.putString(ARG_FIRST_BUTTON_LABEL, firstButtonLabel);
    bundle.putString(ARG_SECOND_BUTTON_LABEL, secondButtonLabel);
    bundle.putString(ARG_THIRD_BUTTON_LABEL, thirdButtonLabel);
    bundle.putInt(ARG_SECOND_BUTTON_ACTION, secondButtonAction);
    bundle.putInt(ARG_THIRD_BUTTON_ACTION, thirdButtonAction);
    adf.setArguments(bundle);
    adf.setStyle(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme);
    return adf;
}

22. NumberProgressBar#onSaveInstanceState()

Project: UltimateAndroid
File: NumberProgressBar.java
@Override
protected Parcelable onSaveInstanceState() {
    final Bundle bundle = new Bundle();
    bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
    bundle.putInt(INSTANCE_TEXT_COLOR, getTextColor());
    bundle.putFloat(INSTANCE_TEXT_SIZE, getProgressTextSize());
    bundle.putFloat(INSTANCE_REACHED_BAR_HEIGHT, getReachedBarHeight());
    bundle.putFloat(INSTANCE_UNREACHED_BAR_HEIGHT, getUnreachedBarHeight());
    bundle.putInt(INSTANCE_REACHED_BAR_COLOR, getReachedBarColor());
    bundle.putInt(INSTANCE_UNREACHED_BAR_COLOR, getUnreachedBarColor());
    bundle.putInt(INSTANCE_MAX, getMax());
    bundle.putInt(INSTANCE_PROGRESS, getProgress());
    return bundle;
}

23. NumberProgressBar#onSaveInstanceState()

Project: UltimateAndroid
File: NumberProgressBar.java
@Override
protected Parcelable onSaveInstanceState() {
    final Bundle bundle = new Bundle();
    bundle.putParcelable(INSTANCE_STATE, super.onSaveInstanceState());
    bundle.putInt(INSTANCE_TEXT_COLOR, getTextColor());
    bundle.putFloat(INSTANCE_TEXT_SIZE, getProgressTextSize());
    bundle.putFloat(INSTANCE_REACHED_BAR_HEIGHT, getReachedBarHeight());
    bundle.putFloat(INSTANCE_UNREACHED_BAR_HEIGHT, getUnreachedBarHeight());
    bundle.putInt(INSTANCE_REACHED_BAR_COLOR, getReachedBarColor());
    bundle.putInt(INSTANCE_UNREACHED_BAR_COLOR, getUnreachedBarColor());
    bundle.putInt(INSTANCE_MAX, getMax());
    bundle.putInt(INSTANCE_PROGRESS, getProgress());
    return bundle;
}

24. Episode#toBundle()

Project: SeriesGuide
File: Episode.java
/**
     * Serializes this {@link Episode} object to a {@link android.os.Bundle} representation.
     */
public Bundle toBundle() {
    Bundle bundle = new Bundle();
    bundle.putString(KEY_TITLE, mTitle);
    bundle.putInt(KEY_NUMBER, mNumber);
    bundle.putInt(KEY_NUMBER_ABSOLUTE, mNumberAbsolute);
    bundle.putInt(KEY_SEASON, mSeason);
    bundle.putInt(KEY_TVDBID, mTvdbId);
    bundle.putString(KEY_IMDBID, mImdbId);
    bundle.putString(KEY_SHOW_TITLE, mShowTitle);
    bundle.putInt(KEY_SHOW_TVDBID, mShowTvdbId);
    bundle.putString(KEY_SHOW_IMDBID, mShowImdbId);
    return bundle;
}

25. MainActivity#displayClassSelectionActivity()

Project: habitrpg-android
File: MainActivity.java
@Subscribe
public void displayClassSelectionActivity(SelectClassEvent event) {
    Bundle bundle = new Bundle();
    bundle.putString("size", user.getPreferences().getSize());
    bundle.putString("skin", user.getPreferences().getSkin());
    bundle.putString("shirt", user.getPreferences().getShirt());
    bundle.putInt("hairBangs", user.getPreferences().getHair().getBangs());
    bundle.putInt("hairBase", user.getPreferences().getHair().getBase());
    bundle.putString("hairColor", user.getPreferences().getHair().getColor());
    bundle.putInt("hairMustache", user.getPreferences().getHair().getMustache());
    bundle.putInt("hairBeard", user.getPreferences().getHair().getBeard());
    bundle.putBoolean("isInitialSelection", event.isInitialSelection);
    Intent intent = new Intent(this, ClassSelectionActivity.class);
    intent.putExtras(bundle);
    startActivityForResult(intent, SELECT_CLASS_RESULT);
}

26. TVShowDetailsFragment#newInstance()

Project: Kore
File: TVShowDetailsFragment.java
/**
     * Create a new instance of this, initialized to show tvshowId
     */
@TargetApi(21)
public static TVShowDetailsFragment newInstance(TVShowListFragment.ViewHolder vh) {
    TVShowDetailsFragment fragment = new TVShowDetailsFragment();
    Bundle args = new Bundle();
    args.putInt(BUNDLE_KEY_TVSHOWID, vh.tvshowId);
    args.putInt(BUNDLE_KEY_EPISODE, vh.episode);
    args.putString(BUNDLE_KEY_GENRES, vh.genres);
    args.putString(BUNDLE_KEY_PLOT, vh.plot);
    args.putString(BUNDLE_KEY_PREMIERED, vh.premiered);
    args.putDouble(BUNDLE_KEY_RATING, vh.rating);
    args.putString(BUNDLE_KEY_STUDIO, vh.studio);
    args.putString(BUNDLE_KEY_TITLE, vh.tvshowTitle);
    args.putInt(BUNDLE_KEY_WATCHEDEPISODES, vh.watchedEpisodes);
    if (Utils.isLollipopOrLater()) {
        args.putString(POSTER_TRANS_NAME, vh.artView.getTransitionName());
    }
    fragment.setArguments(args);
    return fragment;
}

27. ParallaxWelcomeFragment#newInstance()

Project: welcome-android
File: ParallaxWelcomeFragment.java
public static ParallaxWelcomeFragment newInstance(@LayoutRes int layoutId, String title, String description, float startParallaxFactor, float endParallaxFactor, boolean parallaxRecursive, String headerTypefacePath, String descriptionTypefacePath) {
    Bundle args = new Bundle();
    args.putInt(KEY_LAYOUT_ID, layoutId);
    args.putString(KEY_TITLE, title);
    args.putString(KEY_DESCRIPTION, description);
    args.putFloat(KEY_START_FACTOR, startParallaxFactor);
    args.putFloat(KEY_END_FACTOR, endParallaxFactor);
    args.putBoolean(KEY_PARALLAX_RECURSIVE, parallaxRecursive);
    args.putString(KEY_HEADER_TYPEFACE_PATH, headerTypefacePath);
    args.putString(KEY_DESCRIPTION_TYPEFACE_PATH, descriptionTypefacePath);
    ParallaxWelcomeFragment fragment = new ParallaxWelcomeFragment();
    fragment.setArguments(args);
    return fragment;
}

28. TouchImageViewCustom#onSaveInstanceState()

Project: MyRepository-master
File: TouchImageViewCustom.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

29. Artwork#toBundle()

Project: muzei
File: Artwork.java
/**
     * Serializes this artwork object to a {@link Bundle} representation.
     */
public Bundle toBundle() {
    Bundle bundle = new Bundle();
    bundle.putString(KEY_COMPONENT_NAME, (mComponentName != null) ? mComponentName.flattenToShortString() : null);
    bundle.putString(KEY_IMAGE_URI, (mImageUri != null) ? mImageUri.toString() : null);
    bundle.putString(KEY_TITLE, mTitle);
    bundle.putString(KEY_BYLINE, mByline);
    bundle.putString(KEY_ATTRIBUTION, mAttribution);
    bundle.putString(KEY_TOKEN, mToken);
    bundle.putString(KEY_VIEW_INTENT, (mViewIntent != null) ? mViewIntent.toUri(Intent.URI_INTENT_SCHEME) : null);
    bundle.putString(KEY_META_FONT, mMetaFont);
    return bundle;
}

30. TouchImageView#onSaveInstanceState()

Project: ImageGallery
File: TouchImageView.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

31. ImporterTest#testGetDataExportPreferences_withPreferences()

Project: google-authenticator-android
File: ImporterTest.java
public void testGetDataExportPreferences_withPreferences() {
    Bundle prefBundle = new Bundle();
    prefBundle.putBoolean("bool", true);
    prefBundle.putInt("int", 9);
    prefBundle.putFloat("float", 3.14f);
    prefBundle.putString("string", "testing");
    prefBundle.putLong("long", 0x123456DEADBEEFL);
    prefBundle.putStringArray("stringarray", new String[] { "1", "2", "3" });
    Bundle bundle = new Bundle();
    bundle.putBundle("preferences", prefBundle);
    mImporter.importFromBundle(bundle, null, mMockPreferences);
    verify(mMockPreferencesEditor).putBoolean("bool", true);
    verify(mMockPreferencesEditor).putInt("int", 9);
    verify(mMockPreferencesEditor).putFloat("float", 3.14f);
    verify(mMockPreferencesEditor).putString("string", "testing");
    verify(mMockPreferencesEditor).putLong("long", 0x123456DEADBEEFL);
    verify(mMockPreferencesEditor).commit();
    verifyNoMoreInteractions(mMockPreferencesEditor);
}

32. TouchImageView#onSaveInstanceState()

Project: TouchImageView
File: TouchImageView.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

33. TouchImageView#onSaveInstanceState()

Project: show-java
File: TouchImageView.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

34. TouchImageView#onSaveInstanceState()

Project: PhotoPicker
File: TouchImageView.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

35. ProfilePictureView#onSaveInstanceState()

Project: q-municate-android
File: ProfilePictureView.java
/**
     * Some of the current state is returned as a Bundle to allow quick restoration
     * of the ProfilePictureView object in scenarios like orientation changes.
     * @return a Parcelable containing the current state
     */
@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    Bundle instanceState = new Bundle();
    instanceState.putParcelable(SUPER_STATE_KEY, superState);
    instanceState.putString(PROFILE_ID_KEY, profileId);
    instanceState.putInt(PRESET_SIZE_KEY, presetSizeType);
    instanceState.putBoolean(IS_CROPPED_KEY, isCropped);
    instanceState.putParcelable(BITMAP_KEY, imageContents);
    instanceState.putInt(BITMAP_WIDTH_KEY, queryWidth);
    instanceState.putInt(BITMAP_HEIGHT_KEY, queryHeight);
    instanceState.putBoolean(PENDING_REFRESH_KEY, lastRequest != null);
    return instanceState;
}

36. TouchImageView#onSaveInstanceState()

Project: Meizi
File: TouchImageView.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

37. TouchImageView#onSaveInstanceState()

Project: MarkdownEditors
File: TouchImageView.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

38. MusicVideoDetailsFragment#newInstance()

Project: Kore
File: MusicVideoDetailsFragment.java
/**
     * Create a new instance of this, initialized to show the video musicVideoId
     */
@TargetApi(21)
public static MusicVideoDetailsFragment newInstance(MusicVideoListFragment.ViewHolder vh) {
    MusicVideoDetailsFragment fragment = new MusicVideoDetailsFragment();
    Bundle args = new Bundle();
    args.putInt(BUNDLE_KEY_ID, vh.musicVideoId);
    args.putString(BUNDLE_KEY_TITLE, vh.musicVideoTitle);
    args.putString(BUNDLE_KEY_ALBUM, vh.album);
    args.putString(BUNDLE_KEY_ARTIST, vh.artist);
    args.putString(BUNDLE_KEY_GENRES, vh.genres);
    args.putString(BUNDLE_KEY_PLOT, vh.plot);
    args.putInt(BUNDLE_KEY_RUNTIME, vh.runtime);
    args.putInt(BUNDLE_KEY_YEAR, vh.year);
    if (Utils.isLollipopOrLater()) {
        args.putString(POSTER_TRANS_NAME, vh.artView.getTransitionName());
    }
    fragment.setArguments(args);
    return fragment;
}

39. TouchImageView#onSaveInstanceState()

Project: GankMeizhi
File: TouchImageView.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

40. TouchImageView#onSaveInstanceState()

Project: GankApp
File: TouchImageView.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

41. AppVersionInfo#writeToParcel()

Project: fanfouapp-opensource
File: AppVersionInfo.java
@Override
public void writeToParcel(final Parcel dest, final int flags) {
    final Bundle bundle = new Bundle();
    bundle.putInt("versionCode", this.versionCode);
    bundle.putString("versionName", this.versionName);
    bundle.putString("releaseDate", this.releaseDate);
    bundle.putString("changelog", this.changelog);
    bundle.putString("downloadUrl", this.downloadUrl);
    bundle.putString("versionType", this.versionType);
    bundle.putString("packageName", this.packageName);
    bundle.putBoolean("forceUpdate", this.forceUpdate);
    dest.writeBundle(bundle);
}

42. BootstrapProgressBar#onSaveInstanceState()

Project: Android-Bootstrap
File: BootstrapProgressBar.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable(TAG, super.onSaveInstanceState());
    bundle.putInt(KEY_USER_PROGRESS, userProgress);
    bundle.putInt(KEY_DRAWN_PROGRESS, drawnProgress);
    bundle.putBoolean(KEY_STRIPED, striped);
    bundle.putBoolean(KEY_ANIMATED, animated);
    bundle.putBoolean(RoundableView.KEY, rounded);
    bundle.putFloat(BootstrapSizeView.KEY, bootstrapSize);
    bundle.putSerializable(BootstrapBrand.KEY, bootstrapBrand);
    return bundle;
}

43. TouchImageViewCustom#onSaveInstanceState()

Project: android
File: TouchImageViewCustom.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}

44. ProfilePictureView#onSaveInstanceState()

Project: astrid
File: ProfilePictureView.java
/**
     * Some of the current state is returned as a Bundle to allow quick restoration
     * of the ProfilePictureView object in scenarios like orientation changes.
     * @return a Parcelable containing the current state
     */
@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    Bundle instanceState = new Bundle();
    instanceState.putParcelable(SUPER_STATE_KEY, superState);
    instanceState.putString(PROFILE_ID_KEY, profileId);
    instanceState.putInt(PRESET_SIZE_KEY, presetSizeType);
    instanceState.putBoolean(IS_CROPPED_KEY, isCropped);
    instanceState.putParcelable(BITMAP_KEY, imageContents);
    instanceState.putInt(BITMAP_WIDTH_KEY, queryWidth);
    instanceState.putInt(BITMAP_HEIGHT_KEY, queryHeight);
    instanceState.putBoolean(PENDING_REFRESH_KEY, lastRequest != null);
    return instanceState;
}

45. HillshadeRendererParametersFragment#newInstance()

Project: arcgis-runtime-samples-android
File: HillshadeRendererParametersFragment.java
public static HillshadeRendererParametersFragment newInstance(int code, double altitude, double azimuth, double zfactor, int slotType, double pixelSizeFactor, double pixelSizePower, double gamma) {
    HillshadeRendererParametersFragment fragment = new HillshadeRendererParametersFragment();
    Bundle args = new Bundle();
    args.putInt(KEY_INT, code);
    args.putDouble(KEY_ALTITUDE, altitude);
    args.putDouble(KEY_AZIMUTH, azimuth);
    args.putDouble(KEY_ZFACTOR, zfactor);
    args.putInt(KEY_SLOPE_TYPE, slotType);
    args.putDouble(KEY_PIXEL_SIZE_FACTOR, pixelSizeFactor);
    args.putDouble(KEY_PIXEL_SIZE_POWER, pixelSizePower);
    args.putDouble(KEY_GAMMA, gamma);
    fragment.setArguments(args);
    return fragment;
}

46. DonationsFragment#newInstance()

Project: cheapcast
File: DonationsFragment.java
/**
     * Instantiate DonationsFragment.
     *
     * @param debug               You can use BuildConfig.DEBUG to propagate the debug flag from your app to the Donations library
     * @param paypalEnabled       Enable PayPal donations
     * @param paypalUser          Your PayPal email address
     * @param paypalCurrencyCode  Currency code like EUR. See here for other codes:
     *                            https://developer.paypal.com/webapps/developer/docs/classic/api/currency_codes/#id09A6G0U0GYK
     * @param paypalItemName      Display item name on PayPal, like "Donation for NTPSync"
     * @param flattrEnabled       Enable Flattr donations
     * @param flattrProjectUrl    The project URL used on Flattr
     * @param flattrUrl           The Flattr URL to your thing. NOTE: Enter without http://
     * @return DonationsFragment
     */
public static DonationsFragment newInstance(boolean debug, boolean paypalEnabled, String paypalUser, String paypalCurrencyCode, String paypalItemName, boolean flattrEnabled, String flattrProjectUrl, String flattrUrl) {
    DonationsFragment donationsFragment = new DonationsFragment();
    Bundle args = new Bundle();
    args.putBoolean(ARG_DEBUG, debug);
    args.putBoolean(ARG_PAYPAL_ENABLED, paypalEnabled);
    args.putString(ARG_PAYPAL_USER, paypalUser);
    args.putString(ARG_PAYPAL_CURRENCY_CODE, paypalCurrencyCode);
    args.putString(ARG_PAYPAL_ITEM_NAME, paypalItemName);
    args.putBoolean(ARG_FLATTR_ENABLED, flattrEnabled);
    args.putString(ARG_FLATTR_PROJECT_URL, flattrProjectUrl);
    args.putString(ARG_FLATTR_URL, flattrUrl);
    donationsFragment.setArguments(args);
    return donationsFragment;
}

47. BluetoothLeDevice#writeToParcel()

Project: Bluetooth-LE-Library---Android
File: BluetoothLeDevice.java
/* (non-Javadoc)
     * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int)
     */
@Override
public void writeToParcel(final Parcel parcel, final int arg1) {
    final Bundle b = new Bundle(getClass().getClassLoader());
    b.putByteArray(PARCEL_EXTRA_DEVICE_SCANRECORD, mScanRecord);
    b.putInt(PARCEL_EXTRA_FIRST_RSSI, mFirstRssi);
    b.putInt(PARCEL_EXTRA_CURRENT_RSSI, mCurrentRssi);
    b.putLong(PARCEL_EXTRA_FIRST_TIMESTAMP, mFirstTimestamp);
    b.putLong(PARCEL_EXTRA_CURRENT_TIMESTAMP, mCurrentTimestamp);
    b.putParcelable(PARCEL_EXTRA_BLUETOOTH_DEVICE, mDevice);
    b.putParcelable(PARCEL_EXTRA_DEVICE_SCANRECORD_STORE, mRecordStore);
    b.putSerializable(PARCEL_EXTRA_DEVICE_RSSI_LOG, (Serializable) mRssiLog);
    parcel.writeBundle(b);
}

48. ExtensionData#toBundle()

Project: dashclock
File: ExtensionData.java
/**
     * Serializes the contents of this object to a {@link Bundle}.
     */
public Bundle toBundle() {
    Bundle data = new Bundle();
    data.putBoolean(KEY_VISIBLE, mVisible);
    data.putInt(KEY_ICON, mIcon);
    data.putString(KEY_ICON_URI, (mIconUri == null ? null : mIconUri.toString()));
    data.putString(KEY_STATUS, mStatus);
    data.putString(KEY_EXPANDED_TITLE, mExpandedTitle);
    data.putString(KEY_EXPANDED_BODY, mExpandedBody);
    data.putString(KEY_CLICK_INTENT, (mClickIntent == null) ? null : mClickIntent.toUri(0));
    data.putString(KEY_CONTENT_DESCRIPTION, mContentDescription);
    return data;
}

49. ProfilePictureView#onSaveInstanceState()

Project: ANE-Facebook
File: ProfilePictureView.java
/**
     * Some of the current state is returned as a Bundle to allow quick restoration
     * of the ProfilePictureView object in scenarios like orientation changes.
     * @return a Parcelable containing the current state
     */
@Override
protected Parcelable onSaveInstanceState() {
    Parcelable superState = super.onSaveInstanceState();
    Bundle instanceState = new Bundle();
    instanceState.putParcelable(SUPER_STATE_KEY, superState);
    instanceState.putString(PROFILE_ID_KEY, profileId);
    instanceState.putInt(PRESET_SIZE_KEY, presetSizeType);
    instanceState.putBoolean(IS_CROPPED_KEY, isCropped);
    instanceState.putParcelable(BITMAP_KEY, imageContents);
    instanceState.putInt(BITMAP_WIDTH_KEY, queryWidth);
    instanceState.putInt(BITMAP_HEIGHT_KEY, queryHeight);
    instanceState.putBoolean(PENDING_REFRESH_KEY, lastRequest != null);
    return instanceState;
}

50. SlideDateTimeDialogFragment#newInstance()

Project: SlideDateTimePicker
File: SlideDateTimeDialogFragment.java
/**
     * <p>Return a new instance of {@code SlideDateTimeDialogFragment} with its bundle
     * filled with the incoming arguments.</p>
     *
     * <p>Called by {@link SlideDateTimePicker#show()}.</p>
     *
     * @param listener
     * @param initialDate
     * @param minDate
     * @param maxDate
     * @param isClientSpecified24HourTime
     * @param is24HourTime
     * @param theme
     * @param indicatorColor
     * @return
     */
public static SlideDateTimeDialogFragment newInstance(SlideDateTimeListener listener, Date initialDate, Date minDate, Date maxDate, boolean isClientSpecified24HourTime, boolean is24HourTime, int theme, int indicatorColor) {
    mListener = listener;
    // Create a new instance of SlideDateTimeDialogFragment
    SlideDateTimeDialogFragment dialogFragment = new SlideDateTimeDialogFragment();
    // Store the arguments and attach the bundle to the fragment
    Bundle bundle = new Bundle();
    bundle.putSerializable("initialDate", initialDate);
    bundle.putSerializable("minDate", minDate);
    bundle.putSerializable("maxDate", maxDate);
    bundle.putBoolean("isClientSpecified24HourTime", isClientSpecified24HourTime);
    bundle.putBoolean("is24HourTime", is24HourTime);
    bundle.putInt("theme", theme);
    bundle.putInt("indicatorColor", indicatorColor);
    dialogFragment.setArguments(bundle);
    // Return the fragment with its bundle
    return dialogFragment;
}

51. StoryRecyclerViewAdapter#saveState()

Project: materialistic
File: StoryRecyclerViewAdapter.java
@Override
public Bundle saveState() {
    Bundle savedState = super.saveState();
    savedState.putParcelableArrayList(STATE_ITEMS, mItems);
    savedState.putParcelableArrayList(STATE_UPDATED, mUpdated);
    savedState.putStringArrayList(STATE_PROMOTED, mPromoted);
    savedState.putBoolean(STATE_SHOW_ALL, mShowAll);
    savedState.putBoolean(STATE_HIGHLIGHT_UPDATED, mHighlightUpdated);
    savedState.putInt(STATE_FAVORITE_REVISION, mFavoriteRevision);
    savedState.putString(STATE_USERNAME, mUsername);
    return savedState;
}

52. MovieDetailsFragment#newInstance()

Project: Kore
File: MovieDetailsFragment.java
/**
     * Create a new instance of this, initialized to show the movie movieId
     */
@TargetApi(21)
public static MovieDetailsFragment newInstance(MovieListFragment.ViewHolder vh) {
    MovieDetailsFragment fragment = new MovieDetailsFragment();
    Bundle args = new Bundle();
    args.putInt(BUNDLE_KEY_MOVIEID, vh.movieId);
    args.putString(BUNDLE_KEY_MOVIETITLE, vh.movieTitle);
    args.putString(BUNDLE_KEY_MOVIEPLOT, vh.movieTagline);
    args.putString(BUNDLE_KEY_MOVIEGENRES, vh.movieGenres);
    args.putInt(BUNDLE_KEY_MOVIEYEAR, vh.movieYear);
    args.putInt(BUNDLE_KEY_MOVIERUNTIME, vh.movieRuntime);
    args.putDouble(BUNDLE_KEY_MOVIERATING, vh.movieRating);
    if (Utils.isLollipopOrLater()) {
        args.putString(POSTER_TRANS_NAME, vh.artView.getTransitionName());
    }
    fragment.setArguments(args);
    return fragment;
}

53. ArtistDetailsFragment#newInstance()

Project: Kore
File: ArtistDetailsFragment.java
/**
     * Create a new instance of this, initialized to show tvshowId
     */
@TargetApi(21)
public static ArtistDetailsFragment newInstance(ArtistListFragment.ViewHolder vh) {
    ArtistDetailsFragment fragment = new ArtistDetailsFragment();
    Bundle args = new Bundle();
    args.putInt(ArtistOverviewFragment.BUNDLE_KEY_ARTISTID, vh.artistId);
    args.putInt(AlbumListFragment.BUNDLE_KEY_ARTISTID, vh.artistId);
    args.putString(ArtistOverviewFragment.BUNDLE_KEY_TITLE, vh.artistName);
    args.putString(ArtistOverviewFragment.BUNDLE_KEY_FANART, vh.fanart);
    args.putString(ArtistOverviewFragment.BUNDLE_KEY_DESCRIPTION, vh.description);
    args.putString(ArtistOverviewFragment.BUNDLE_KEY_GENRE, vh.genres);
    args.putString(ArtistOverviewFragment.BUNDLE_KEY_POSTER, vh.poster);
    if (Utils.isLollipopOrLater()) {
        args.putString(ArtistOverviewFragment.POSTER_TRANS_NAME, vh.artView.getTransitionName());
    }
    fragment.setArguments(args);
    return fragment;
}

54. AuthorizationClient#newAuthorizationLoggingBundle()

Project: q-municate-android
File: AuthorizationClient.java
static Bundle newAuthorizationLoggingBundle(String authLoggerId) {
    // We want to log all parameters for all events, to ensure stability of columns across different event types.
    Bundle bundle = new Bundle();
    bundle.putLong(EVENT_PARAM_TIMESTAMP, System.currentTimeMillis());
    bundle.putString(EVENT_PARAM_AUTH_LOGGER_ID, authLoggerId);
    bundle.putString(EVENT_PARAM_METHOD, "");
    bundle.putString(EVENT_PARAM_LOGIN_RESULT, "");
    bundle.putString(EVENT_PARAM_ERROR_MESSAGE, "");
    bundle.putString(EVENT_PARAM_ERROR_CODE, "");
    bundle.putString(EVENT_PARAM_EXTRAS, "");
    return bundle;
}

55. EditTextDialogFragment#newInstance()

Project: CameraColorPicker
File: EditTextDialogFragment.java
/**
     * Create a new instance of a {@link EditTextDialogFragment} to ask the user to define the name of a {@link Palette}.
     *
     * @param requestCode              the request code
     * @param titleResourceId          the resource id of the title.
     * @param positiveButtonResourceId the resource id of the positive button.
     * @param negativeButtonResourceId the resource id of the negative button.
     * @param editTextHint             the edit text hint.
     * @param editTextInitialText      the initial text of the edit text.
     * @param allowEmptyString         if true empty string will be allowed, otherwise a 'nope' animation will be played if the user tries to validate an empty string.
     * @return the newly created {@link EditTextDialogFragment}.
     */
public static EditTextDialogFragment newInstance(int requestCode, @StringRes int titleResourceId, @StringRes int positiveButtonResourceId, @StringRes int negativeButtonResourceId, String editTextHint, String editTextInitialText, boolean allowEmptyString) {
    final EditTextDialogFragment instance = new EditTextDialogFragment();
    final Bundle args = new Bundle();
    args.putInt(ARG_REQUEST_CODE, requestCode);
    args.putInt(ARG_TITLE_RESOURCE_ID, titleResourceId);
    args.putInt(ARG_POSITIVE_BUTTON_RESOURCE_ID, positiveButtonResourceId);
    args.putInt(ARG_NEGATIVE_BUTTON_RESOURCE_ID, negativeButtonResourceId);
    args.putString(ARG_EDIT_TEXT_HINT, editTextHint);
    args.putString(ARG_EDIT_TEXT_INITIAL_TEXT, editTextInitialText);
    args.putBoolean(ARG_ALLOW_EMPTY_STRING, allowEmptyString);
    instance.setArguments(args);
    return instance;
}

56. AppLinkNavigation#buildAppLinkDataForNavigation()

Project: Bolts-Android
File: AppLinkNavigation.java
/**
   * Creates a bundle containing the final, constructed App Link data to be used in navigation.
   */
private Bundle buildAppLinkDataForNavigation(Context context) {
    Bundle data = new Bundle();
    Bundle refererAppLinkData = new Bundle();
    if (context != null) {
        String refererAppPackage = context.getPackageName();
        if (refererAppPackage != null) {
            refererAppLinkData.putString(KEY_NAME_REFERER_APP_LINK_PACKAGE, refererAppPackage);
        }
        ApplicationInfo appInfo = context.getApplicationInfo();
        if (appInfo != null) {
            String refererAppName = context.getString(appInfo.labelRes);
            if (refererAppName != null) {
                refererAppLinkData.putString(KEY_NAME_REFERER_APP_LINK_APP_NAME, refererAppName);
            }
        }
    }
    data.putAll(getAppLinkData());
    data.putString(AppLinks.KEY_NAME_TARGET, getAppLink().getSourceUrl().toString());
    data.putString(KEY_NAME_VERSION, VERSION);
    data.putString(KEY_NAME_USER_AGENT, "Bolts Android " + Bolts.VERSION);
    data.putBundle(KEY_NAME_REFERER_APP_LINK, refererAppLinkData);
    data.putBundle(AppLinks.KEY_NAME_EXTRAS, getExtras());
    return data;
}

57. AuthorizationClient#newAuthorizationLoggingBundle()

Project: ANE-Facebook
File: AuthorizationClient.java
static Bundle newAuthorizationLoggingBundle(String authLoggerId) {
    // We want to log all parameters for all events, to ensure stability of columns across different event types.
    Bundle bundle = new Bundle();
    bundle.putLong(EVENT_PARAM_TIMESTAMP, System.currentTimeMillis());
    bundle.putString(EVENT_PARAM_AUTH_LOGGER_ID, authLoggerId);
    bundle.putString(EVENT_PARAM_METHOD, "");
    bundle.putString(EVENT_PARAM_LOGIN_RESULT, "");
    bundle.putString(EVENT_PARAM_ERROR_MESSAGE, "");
    bundle.putString(EVENT_PARAM_ERROR_CODE, "");
    bundle.putString(EVENT_PARAM_EXTRAS, "");
    return bundle;
}

58. CameraFragment#newVideoInstance()

Project: cwac-cam2
File: CameraFragment.java
public static CameraFragment newVideoInstance(Uri output, boolean updateMediaStore, int quality, int sizeLimit, int durationLimit, boolean facingExactMatch, ChronoType chronoType) {
    CameraFragment f = new CameraFragment();
    Bundle args = new Bundle();
    args.putParcelable(ARG_OUTPUT, output);
    args.putBoolean(ARG_UPDATE_MEDIA_STORE, updateMediaStore);
    args.putBoolean(ARG_IS_VIDEO, true);
    args.putInt(ARG_QUALITY, quality);
    args.putInt(ARG_SIZE_LIMIT, sizeLimit);
    args.putInt(ARG_DURATION_LIMIT, durationLimit);
    args.putBoolean(ARG_FACING_EXACT_MATCH, facingExactMatch);
    if (durationLimit > 0 || chronoType != ChronoType.COUNT_DOWN) {
        args.putSerializable(ARG_CHRONOTYPE, chronoType);
    }
    f.setArguments(args);
    return (f);
}

59. CameraFragment#newPictureInstance()

Project: cwac-cam2
File: CameraFragment.java
public static CameraFragment newPictureInstance(Uri output, boolean updateMediaStore, int quality, ZoomStyle zoomStyle, boolean facingExactMatch, boolean skipOrientationNormalization) {
    CameraFragment f = new CameraFragment();
    Bundle args = new Bundle();
    args.putParcelable(ARG_OUTPUT, output);
    args.putBoolean(ARG_UPDATE_MEDIA_STORE, updateMediaStore);
    args.putBoolean(ARG_SKIP_ORIENTATION_NORMALIZATION, skipOrientationNormalization);
    args.putInt(ARG_QUALITY, quality);
    args.putBoolean(ARG_IS_VIDEO, false);
    args.putSerializable(ARG_ZOOM_STYLE, zoomStyle);
    args.putBoolean(ARG_FACING_EXACT_MATCH, facingExactMatch);
    f.setArguments(args);
    return (f);
}

60. GaugeView#onSaveInstanceState()

Project: GaugeView
File: GaugeView.java
@Override
protected Parcelable onSaveInstanceState() {
    final Parcelable superState = super.onSaveInstanceState();
    final Bundle state = new Bundle();
    state.putParcelable("superState", superState);
    state.putBoolean("needleInitialized", mNeedleInitialized);
    state.putFloat("needleVelocity", mNeedleVelocity);
    state.putFloat("needleAcceleration", mNeedleAcceleration);
    state.putLong("needleLastMoved", mNeedleLastMoved);
    state.putFloat("currentValue", mCurrentValue);
    state.putFloat("targetValue", mTargetValue);
    return state;
}

61. ThreadFragment#createDefault()

Project: XDA-One
File: ThreadFragment.java
public static ThreadFragment createDefault(final int forumId, final String forumTitle, final String parentForumTitle, final ArrayList<String> hierarchy) {
    final Bundle bundle = new Bundle();
    // Internal use
    bundle.putBoolean(ADD_EXTRA_DECOR_ARGUMENT, true);
    bundle.putParcelable(THREAD_LOAD_STRATEGY_ARGUMENT, new DefaultThreadLoaderStrategy());
    bundle.putParcelable(THREAD_CLICK_STRATEGY_ARGUMENT, new FirstThreadClickStrategy());
    // From external
    bundle.putInt(FORUM_ID_ARGUMENT, forumId);
    bundle.putString(FORUM_TITLE_ARGUMENT, forumTitle);
    bundle.putString(PARENT_FORUM_TITLE_ARGUMENT, parentForumTitle);
    bundle.putStringArrayList(FORUM_HIERARCHY_ARGUMENT, hierarchy);
    final ThreadFragment threadFragment = new ThreadFragment();
    threadFragment.setArguments(bundle);
    return threadFragment;
}

62. FileDialogFragment#newInstance()

Project: gnupg-for-android
File: FileDialogFragment.java
/**
     * Creates new instance of this file dialog fragment
     */
public static FileDialogFragment newInstance(Messenger messenger, String title, String message, String defaultFile, String checkboxText, int requestCode) {
    FileDialogFragment frag = new FileDialogFragment();
    Bundle args = new Bundle();
    args.putParcelable(ARG_MESSENGER, messenger);
    args.putString(ARG_TITLE, title);
    args.putString(ARG_MESSAGE, message);
    args.putString(ARG_DEFAULT_FILE, defaultFile);
    args.putString(ARG_CHECKBOX_TEXT, checkboxText);
    args.putInt(ARG_REQUEST_CODE, requestCode);
    frag.setArguments(args);
    return frag;
}

63. PhotoPickerFragment#newInstance()

Project: PhotoPicker
File: PhotoPickerFragment.java
public static PhotoPickerFragment newInstance(boolean showCamera, boolean showGif, boolean previewEnable, int column, int maxCount, ArrayList<String> originalPhotos) {
    Bundle args = new Bundle();
    args.putBoolean(EXTRA_CAMERA, showCamera);
    args.putBoolean(EXTRA_GIF, showGif);
    args.putBoolean(EXTRA_PREVIEW_ENABLED, previewEnable);
    args.putInt(EXTRA_COLUMN, column);
    args.putInt(EXTRA_COUNT, maxCount);
    args.putStringArrayList(EXTRA_ORIGIN, originalPhotos);
    PhotoPickerFragment fragment = new PhotoPickerFragment();
    fragment.setArguments(args);
    return fragment;
}

64. PullToRefreshBase#onSaveInstanceState()

Project: ONE-Unofficial
File: PullToRefreshBase.java
@Override
protected final Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    // Let derivative classes get a chance to save state first, that way we
    // can make sure they don't overrite any of our values
    onPtrSaveInstanceState(bundle);
    bundle.putInt(STATE_STATE, mState.getIntValue());
    bundle.putInt(STATE_MODE, mMode.getIntValue());
    bundle.putInt(STATE_CURRENT_MODE, mCurrentMode.getIntValue());
    bundle.putBoolean(STATE_SCROLLING_REFRESHING_ENABLED, mScrollingWhileRefreshingEnabled);
    bundle.putBoolean(STATE_SHOW_REFRESHING_VIEW, mShowViewWhileRefreshing);
    bundle.putParcelable(STATE_SUPER, super.onSaveInstanceState());
    return bundle;
}

65. PullToRefreshBase#onSaveInstanceState()

Project: MagicHeaderViewPager
File: PullToRefreshBase.java
@Override
protected final Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    // Let derivative classes get a chance to save state first, that way we
    // can make sure they don't overrite any of our values
    onPtrSaveInstanceState(bundle);
    bundle.putInt(STATE_STATE, mState.getIntValue());
    bundle.putInt(STATE_MODE, mMode.getIntValue());
    bundle.putInt(STATE_CURRENT_MODE, mCurrentMode.getIntValue());
    bundle.putBoolean(STATE_SCROLLING_REFRESHING_ENABLED, mScrollingWhileRefreshingEnabled);
    bundle.putBoolean(STATE_SHOW_REFRESHING_VIEW, mShowViewWhileRefreshing);
    bundle.putParcelable(STATE_SUPER, super.onSaveInstanceState());
    return bundle;
}

66. LicensesDialogFragment#newInstance()

Project: LicensesDialog
File: LicensesDialogFragment.java
private static LicensesDialogFragment newInstance(final int rawNoticesResourceId, final boolean showFullLicenseText, final boolean includeOwnLicense, final int themeResourceId, final int dividerColor, final boolean useAppCompat) {
    final LicensesDialogFragment licensesDialogFragment = new LicensesDialogFragment();
    final Bundle args = new Bundle();
    args.putInt(ARGUMENT_NOTICES_XML_ID, rawNoticesResourceId);
    args.putBoolean(ARGUMENT_FULL_LICENSE_TEXT, showFullLicenseText);
    args.putBoolean(ARGUMENT_INCLUDE_OWN_LICENSE, includeOwnLicense);
    args.putInt(ARGUMENT_THEME_XML_ID, themeResourceId);
    args.putInt(ARGUMENT_DIVIDER_COLOR, dividerColor);
    args.putBoolean(ARGUMENT_USE_APPCOMPAT, useAppCompat);
    licensesDialogFragment.setArguments(args);
    return licensesDialogFragment;
}

67. LicensesDialogFragment#newInstance()

Project: LicensesDialog
File: LicensesDialogFragment.java
// ==========================================================================================================================
// Factory
// ==========================================================================================================================
private static LicensesDialogFragment newInstance(final Notices notices, final boolean showFullLicenseText, final boolean includeOwnLicense, final int themeResourceId, final int dividerColor, final boolean useAppCompat) {
    final LicensesDialogFragment licensesDialogFragment = new LicensesDialogFragment();
    final Bundle args = new Bundle();
    args.putParcelable(ARGUMENT_NOTICES, notices);
    args.putBoolean(ARGUMENT_FULL_LICENSE_TEXT, showFullLicenseText);
    args.putBoolean(ARGUMENT_INCLUDE_OWN_LICENSE, includeOwnLicense);
    args.putInt(ARGUMENT_THEME_XML_ID, themeResourceId);
    args.putInt(ARGUMENT_DIVIDER_COLOR, dividerColor);
    args.putBoolean(ARGUMENT_USE_APPCOMPAT, useAppCompat);
    licensesDialogFragment.setArguments(args);
    return licensesDialogFragment;
}

68. AlbumDetailsFragment#newInstance()

Project: Kore
File: AlbumDetailsFragment.java
/**
     * Create a new instance of this, initialized to show the album albumId
     */
@TargetApi(21)
public static AlbumDetailsFragment newInstance(AlbumListFragment.ViewHolder vh) {
    AlbumDetailsFragment fragment = new AlbumDetailsFragment();
    Bundle args = new Bundle();
    args.putInt(BUNDLE_KEY_ALBUMID, vh.albumId);
    args.putString(BUNDLE_KEY_ALBUMTITLE, vh.albumTitle);
    args.putString(BUNDLE_KEY_ALBUMARTIST, vh.albumArtist);
    args.putString(BUNDLE_KEY_ALBUMGENRE, vh.albumGenre);
    args.putInt(BUNDLE_KEY_ALBUMYEAR, vh.albumYear);
    args.putDouble(BUNDLE_KEY_ALBUMRATING, vh.albumRating);
    if (Utils.isLollipopOrLater()) {
        args.putString(POSTER_TRANS_NAME, vh.artView.getTransitionName());
    }
    fragment.setArguments(args);
    return fragment;
}

69. PullToRefreshBase#onSaveInstanceState()

Project: k-9
File: PullToRefreshBase.java
@Override
protected final Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    // Let derivative classes get a chance to save state first, that way we
    // can make sure they don't overrite any of our values
    onPtrSaveInstanceState(bundle);
    bundle.putInt(STATE_STATE, mState.getIntValue());
    bundle.putInt(STATE_MODE, mMode.getIntValue());
    bundle.putInt(STATE_CURRENT_MODE, mCurrentMode.getIntValue());
    bundle.putBoolean(STATE_SCROLLING_REFRESHING_ENABLED, mScrollingWhileRefreshingEnabled);
    bundle.putBoolean(STATE_SHOW_REFRESHING_VIEW, mShowViewWhileRefreshing);
    bundle.putParcelable(STATE_SUPER, super.onSaveInstanceState());
    return bundle;
}

70. RemoveFileDialogFragment#newInstance()

Project: MyRepository-master
File: RemoveFileDialogFragment.java
/**
     * Public factory method to create new RemoveFileDialogFragment instances.
     * 
     * @param file            File to remove.
     * @return                Dialog ready to show.
     */
public static RemoveFileDialogFragment newInstance(OCFile file) {
    RemoveFileDialogFragment frag = new RemoveFileDialogFragment();
    Bundle args = new Bundle();
    int messageStringId = R.string.confirmation_remove_alert;
    int localRemoveButton = (!file.isFavorite() && (file.isFolder() || file.isDown())) ? R.string.confirmation_remove_local : -1;
    if (file.isFolder()) {
        messageStringId = R.string.confirmation_remove_folder_alert;
    }
    args.putInt(ARG_MESSAGE_RESOURCE_ID, messageStringId);
    args.putStringArray(ARG_MESSAGE_ARGUMENTS, new String[] { file.getFileName() });
    args.putInt(ARG_POSITIVE_BTN_RES, R.string.common_yes);
    args.putInt(ARG_NEUTRAL_BTN_RES, R.string.common_no);
    args.putInt(ARG_NEGATIVE_BTN_RES, localRemoveButton);
    args.putParcelable(ARG_TARGET_FILE, file);
    frag.setArguments(args);
    return frag;
}

71. ConfirmationDialogFragment#newInstance()

Project: MyRepository-master
File: ConfirmationDialogFragment.java
/**
     * Public factory method to create new ConfirmationDialogFragment instances.
     * 
     * @param messageResId      Resource id for a message to show in the dialog.
     * @param messageArguments  Arguments to complete the message, if it's a format string. May be null.
     * @param titleResId        Resource id for a text to show in the title.
     *                          0 for default alert title, -1 for no title.
     * @param posBtn            Resource id for the text of the positive button. -1 for no positive button.
     * @param neuBtn            Resource id for the text of the neutral button. -1 for no neutral button.
     * @param negBtn            Resource id for the text of the negative button. -1 for no negative button.
     * @return                  Dialog ready to show.
     */
public static ConfirmationDialogFragment newInstance(int messageResId, String[] messageArguments, int titleResId, int posBtn, int neuBtn, int negBtn) {
    if (messageResId == -1) {
        throw new IllegalStateException("Calling confirmation dialog without message resource");
    }
    ConfirmationDialogFragment frag = new ConfirmationDialogFragment();
    Bundle args = new Bundle();
    args.putInt(ARG_MESSAGE_RESOURCE_ID, messageResId);
    args.putStringArray(ARG_MESSAGE_ARGUMENTS, messageArguments);
    args.putInt(ARG_TITLE_ID, titleResId);
    args.putInt(ARG_POSITIVE_BTN_RES, posBtn);
    args.putInt(ARG_NEUTRAL_BTN_RES, neuBtn);
    args.putInt(ARG_NEGATIVE_BTN_RES, negBtn);
    frag.setArguments(args);
    return frag;
}

72. FileSourceBrowserFragment#newInstanceSmbFile()

Project: Mizuu
File: FileSourceBrowserFragment.java
public static FileSourceBrowserFragment newInstanceSmbFile(String server, String user, String pass, String domain, boolean isMovie) {
    FileSourceBrowserFragment frag = new FileSourceBrowserFragment();
    Bundle args = new Bundle();
    args.putInt(TYPE, FileSource.SMB);
    args.putString(SERVER, server.replace("smb://", ""));
    args.putString(USER, user);
    args.putString(PASSWORD, pass);
    args.putString(DOMAIN, domain);
    args.putBoolean(MOVIE, isMovie);
    frag.setArguments(args);
    return frag;
}

73. BasicWelcomeFragment#newInstance()

Project: welcome-android
File: BasicWelcomeFragment.java
public static BasicWelcomeFragment newInstance(@DrawableRes int drawableId, String title, String description, boolean showParallaxAnim, String headerTypefacePath, String descriptionTypefacePath) {
    Bundle args = new Bundle();
    args.putInt(KEY_DRAWABLE_ID, drawableId);
    args.putString(KEY_TITLE, title);
    args.putString(KEY_DESCRIPTION, description);
    args.putBoolean(KEY_SHOW_ANIM, showParallaxAnim);
    args.putString(KEY_HEADER_TYPEFACE_PATH, headerTypefacePath);
    args.putString(KEY_DESCRIPTION_TYPEFACE_PATH, descriptionTypefacePath);
    BasicWelcomeFragment fragment = new BasicWelcomeFragment();
    fragment.setArguments(args);
    return fragment;
}

74. PullToRefreshBase#onSaveInstanceState()

Project: weiciyuan
File: PullToRefreshBase.java
@Override
protected final Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    // Let derivative classes get a chance to save state first, that way we
    // can make sure they don't overrite any of our values
    onPtrSaveInstanceState(bundle);
    bundle.putInt(STATE_STATE, mState.getIntValue());
    bundle.putInt(STATE_MODE, mMode.getIntValue());
    bundle.putInt(STATE_CURRENT_MODE, mCurrentMode.getIntValue());
    bundle.putBoolean(STATE_SCROLLING_REFRESHING_ENABLED, mScrollingWhileRefreshingEnabled);
    bundle.putBoolean(STATE_SHOW_REFRESHING_VIEW, mShowViewWhileRefreshing);
    bundle.putParcelable(STATE_SUPER, super.onSaveInstanceState());
    return bundle;
}

75. DateFragment#newInstance()

Project: SlideDateTimePicker
File: DateFragment.java
/**
     * Return an instance of DateFragment with its bundle filled with the
     * constructor arguments. The values in the bundle are retrieved in
     * {@link #onCreateView()} below to properly initialize the DatePicker.
     *
     * @param theme
     * @param year
     * @param month
     * @param day
     * @param minDate
     * @param maxDate
     * @return an instance of DateFragment
     */
public static final DateFragment newInstance(int theme, int year, int month, int day, Date minDate, Date maxDate) {
    DateFragment f = new DateFragment();
    Bundle b = new Bundle();
    b.putInt("theme", theme);
    b.putInt("year", year);
    b.putInt("month", month);
    b.putInt("day", day);
    b.putSerializable("minDate", minDate);
    b.putSerializable("maxDate", maxDate);
    f.setArguments(b);
    return f;
}

76. StretchParametersFragment#newInstance()

Project: arcgis-runtime-samples-android
File: StretchParametersFragment.java
public static StretchParametersFragment newInstance(int code, int stretchType, double stdDev, double minClip, double maxClip, double gamma) {
    StretchParametersFragment fragment = new StretchParametersFragment();
    Bundle args = new Bundle();
    args.putInt(KEY_INT, code);
    args.putInt(KEY_STRETCH_TYPE, stretchType);
    args.putDouble(KEY_STANDARD_DEVIATION, stdDev);
    args.putDouble(KEY_MIN_CLIP, minClip);
    args.putDouble(KEY_MAX_CLIP, maxClip);
    args.putDouble(KEY_GAMMA, gamma);
    fragment.setArguments(args);
    return fragment;
}

77. AppIntroFragment#newInstance()

Project: AppIntro
File: AppIntroFragment.java
public static AppIntroFragment newInstance(CharSequence title, CharSequence description, int imageDrawable, int bgColor, int titleColor, int descColor) {
    AppIntroFragment slide = new AppIntroFragment();
    Bundle args = new Bundle();
    args.putString(ARG_TITLE, title.toString());
    args.putString(ARG_DESC, description.toString());
    args.putInt(ARG_DRAWABLE, imageDrawable);
    args.putInt(ARG_BG_COLOR, bgColor);
    args.putInt(ARG_TITLE_COLOR, titleColor);
    args.putInt(ARG_DESC_COLOR, descColor);
    slide.setArguments(args);
    return slide;
}

78. AppIntro2Fragment#newInstance()

Project: AppIntro
File: AppIntro2Fragment.java
public static AppIntroFragment newInstance(CharSequence title, CharSequence description, int imageDrawable, int bgColor, int titleColor, int descColor) {
    AppIntroFragment slide = new AppIntroFragment();
    Bundle args = new Bundle();
    args.putString(ARG_TITLE, title.toString());
    args.putString(ARG_DESC, description.toString());
    args.putInt(ARG_DRAWABLE, imageDrawable);
    args.putInt(ARG_BG_COLOR, bgColor);
    args.putInt(ARG_TITLE_COLOR, titleColor);
    args.putInt(ARG_DESC_COLOR, descColor);
    slide.setArguments(args);
    return slide;
}

79. BootstrapButton#onSaveInstanceState()

Project: Android-Bootstrap
File: BootstrapButton.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable(TAG, super.onSaveInstanceState());
    bundle.putBoolean(RoundableView.KEY, roundedCorners);
    bundle.putBoolean(OutlineableView.KEY, showOutline);
    bundle.putInt(KEY_INDEX, parentIndex);
    bundle.putFloat(BootstrapSizeView.KEY, bootstrapSize);
    bundle.putSerializable(KEY_MODE, buttonMode);
    if (bootstrapBadge != null) {
        bundle.putString(BadgeContainerView.KEY, bootstrapBadge.getBadgeText());
    }
    return bundle;
}

80. RemoveFileDialogFragment#newInstance()

Project: android
File: RemoveFileDialogFragment.java
/**
     * Public factory method to create new RemoveFileDialogFragment instances.
     * 
     * @param file            File to remove.
     * @return                Dialog ready to show.
     */
public static RemoveFileDialogFragment newInstance(OCFile file) {
    RemoveFileDialogFragment frag = new RemoveFileDialogFragment();
    Bundle args = new Bundle();
    int messageStringId = R.string.confirmation_remove_alert;
    int localRemoveButton = (!file.isFavorite() && (file.isFolder() || file.isDown())) ? R.string.confirmation_remove_local : -1;
    if (file.isFolder()) {
        messageStringId = R.string.confirmation_remove_folder_alert;
    }
    args.putInt(ARG_MESSAGE_RESOURCE_ID, messageStringId);
    args.putStringArray(ARG_MESSAGE_ARGUMENTS, new String[] { file.getFileName() });
    args.putInt(ARG_POSITIVE_BTN_RES, R.string.common_yes);
    args.putInt(ARG_NEUTRAL_BTN_RES, R.string.common_no);
    args.putInt(ARG_NEGATIVE_BTN_RES, localRemoveButton);
    args.putParcelable(ARG_TARGET_FILE, file);
    frag.setArguments(args);
    return frag;
}

81. ConfirmationDialogFragment#newInstance()

Project: android
File: ConfirmationDialogFragment.java
/**
     * Public factory method to create new ConfirmationDialogFragment instances.
     * 
     * @param messageResId      Resource id for a message to show in the dialog.
     * @param messageArguments  Arguments to complete the message, if it's a format string. May be null.
     * @param titleResId        Resource id for a text to show in the title.
     *                          0 for default alert title, -1 for no title.
     * @param posBtn            Resource id for the text of the positive button. -1 for no positive button.
     * @param neuBtn            Resource id for the text of the neutral button. -1 for no neutral button.
     * @param negBtn            Resource id for the text of the negative button. -1 for no negative button.
     * @return                  Dialog ready to show.
     */
public static ConfirmationDialogFragment newInstance(int messageResId, String[] messageArguments, int titleResId, int posBtn, int neuBtn, int negBtn) {
    if (messageResId == -1) {
        throw new IllegalStateException("Calling confirmation dialog without message resource");
    }
    ConfirmationDialogFragment frag = new ConfirmationDialogFragment();
    Bundle args = new Bundle();
    args.putInt(ARG_MESSAGE_RESOURCE_ID, messageResId);
    args.putStringArray(ARG_MESSAGE_ARGUMENTS, messageArguments);
    args.putInt(ARG_TITLE_ID, titleResId);
    args.putInt(ARG_POSITIVE_BTN_RES, posBtn);
    args.putInt(ARG_NEUTRAL_BTN_RES, neuBtn);
    args.putInt(ARG_NEGATIVE_BTN_RES, negBtn);
    frag.setArguments(args);
    return frag;
}

82. MainActivityHelper#addSearchFragment()

Project: AmazeFileManager
File: MainActivityHelper.java
/**
     * Adds a search fragment that can persist it's state on config change
     * @param fragmentManager fragmentManager
     * @param fragment current fragment
     * @param path current path
     * @param input query typed by user
     * @param openMode dunno
     * @param rootMode is root enabled
     * @param regex is regular expression search enabled
     * @param matches is matches enabled for patter matching
     */
public static void addSearchFragment(FragmentManager fragmentManager, Fragment fragment, String path, String input, int openMode, boolean rootMode, boolean regex, boolean matches) {
    Bundle args = new Bundle();
    args.putString(SearchAsyncHelper.KEY_INPUT, input);
    args.putString(SearchAsyncHelper.KEY_PATH, path);
    args.putInt(SearchAsyncHelper.KEY_OPEN_MODE, openMode);
    args.putBoolean(SearchAsyncHelper.KEY_ROOT_MODE, rootMode);
    args.putBoolean(SearchAsyncHelper.KEY_REGEX, regex);
    args.putBoolean(SearchAsyncHelper.KEY_REGEX_MATCHES, matches);
    fragment.setArguments(args);
    fragmentManager.beginTransaction().add(fragment, MainActivity.TAG_ASYNC_HELPER).commit();
}

83. PullToRefreshBase#onSaveInstanceState()

Project: Android-PullToRefresh
File: PullToRefreshBase.java
@Override
protected final Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    // Let derivative classes get a chance to save state first, that way we
    // can make sure they don't overrite any of our values
    onPtrSaveInstanceState(bundle);
    bundle.putInt(STATE_STATE, mState.getIntValue());
    bundle.putInt(STATE_MODE, mMode.getIntValue());
    bundle.putInt(STATE_CURRENT_MODE, mCurrentMode.getIntValue());
    bundle.putBoolean(STATE_SCROLLING_REFRESHING_ENABLED, mScrollingWhileRefreshingEnabled);
    bundle.putBoolean(STATE_SHOW_REFRESHING_VIEW, mShowViewWhileRefreshing);
    bundle.putParcelable(STATE_SUPER, super.onSaveInstanceState());
    return bundle;
}

84. QQShareProxy#shareToQQ()

Project: ESSocialSDK
File: QQShareProxy.java
public static void shareToQQ(Context context, String appId, String title, String summary, String url, String imageUrl, String appName, IUiListener listener) {
    Bundle params = new Bundle();
    params.putInt(QQShare.SHARE_TO_QQ_KEY_TYPE, QQShare.SHARE_TO_QQ_TYPE_DEFAULT);
    params.putString(QQShare.SHARE_TO_QQ_TITLE, title);
    params.putString(QQShare.SHARE_TO_QQ_SUMMARY, summary);
    params.putString(QQShare.SHARE_TO_QQ_TARGET_URL, url);
    params.putString(QQShare.SHARE_TO_QQ_IMAGE_URL, imageUrl);
    params.putString(QQShare.SHARE_TO_QQ_APP_NAME, appName);
    Tencent tencent = getInstance(context, appId);
    tencent.shareToQQ((Activity) context, params, listener);
}

85. PullToRefreshBase#onSaveInstanceState()

Project: AcFun-Area63
File: PullToRefreshBase.java
@Override
protected final Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    // Let derivative classes get a chance to save state first, that way we
    // can make sure they don't overrite any of our values
    onPtrSaveInstanceState(bundle);
    bundle.putInt(STATE_STATE, mState.getIntValue());
    bundle.putInt(STATE_MODE, mMode.getIntValue());
    bundle.putInt(STATE_CURRENT_MODE, mCurrentMode.getIntValue());
    bundle.putBoolean(STATE_SCROLLING_REFRESHING_ENABLED, mScrollingWhileRefreshingEnabled);
    bundle.putBoolean(STATE_SHOW_REFRESHING_VIEW, mShowViewWhileRefreshing);
    bundle.putParcelable(STATE_SUPER, super.onSaveInstanceState());
    return bundle;
}

86. BrowserAccessibilityManager#setAccessibilityEventKitKatAttributes()

Project: chromium_webview
File: BrowserAccessibilityManager.java
@CalledByNative
protected void setAccessibilityEventKitKatAttributes(AccessibilityEvent event, boolean canOpenPopup, boolean contentInvalid, boolean dismissable, boolean multiLine, int inputType, int liveRegion) {
    // Backwards compatibility for KitKat AccessibilityNodeInfo fields.
    Bundle bundle = getOrCreateBundleForAccessibilityEvent(event);
    bundle.putBoolean("AccessibilityNodeInfo.canOpenPopup", canOpenPopup);
    bundle.putBoolean("AccessibilityNodeInfo.contentInvalid", contentInvalid);
    bundle.putBoolean("AccessibilityNodeInfo.dismissable", dismissable);
    bundle.putBoolean("AccessibilityNodeInfo.multiLine", multiLine);
    bundle.putInt("AccessibilityNodeInfo.inputType", inputType);
    bundle.putInt("AccessibilityNodeInfo.liveRegion", liveRegion);
}

87. MessageDialogFragment#newInstance()

Project: Book-Catalogue
File: MessageDialogFragment.java
/**
	 * Constructor
	 * 
	 * @param dialogId	ID passed by caller. Can be 0, will be passed back in event
	 * @param titleId	Title to display
	 *
	 * @return			Created fragment
	 */
public static MessageDialogFragment newInstance(int dialogId, int titleId, String message, int buttonPositiveTextId, int buttonNegativeTextId, int buttonNeutralTextId) {
    MessageDialogFragment frag = new MessageDialogFragment();
    Bundle args = new Bundle();
    args.putInt("dialogId", dialogId);
    args.putInt("titleId", titleId);
    args.putString("message", message);
    args.putInt("buttonPositiveTextId", buttonPositiveTextId);
    args.putInt("buttonNegativeTextId", buttonNegativeTextId);
    args.putInt("buttonNeutralTextId", buttonNeutralTextId);
    frag.setArguments(args);
    return frag;
}

88. BackupInfo#createInfo()

Project: Book-Catalogue
File: BackupInfo.java
/**
	 * Static method to create an INFO block based on the current environment.
	 * 
	 * @param container		The container being used (we want the version)
	 * @param db			Database
	 * @param context		Context (for package-related info)
	 * 
	 * @return				a new BackupInfo object
	 */
public static BackupInfo createInfo(BackupContainer container, CatalogueDBAdapter db, Context context, int bookCount, int coverCount) {
    Bundle info = new Bundle();
    info.putInt(INFO_ARCHVERSION, container.getVersion());
    info.putInt(INFO_COMPATARCHIVER, 1);
    info.putString(INFO_CREATEDATE, Utils.toSqlDateTime(new Date()));
    info.putInt(INFO_NUMBOOKS, bookCount);
    info.putInt(INFO_NUMCOVERS, coverCount);
    try {
        // Get app info
        PackageManager manager = context.getPackageManager();
        PackageInfo appInfo = manager.getPackageInfo(context.getPackageName(), 0);
        info.putString(INFO_APPPACKAGE, appInfo.packageName);
        info.putString(INFO_APPVERSIONNAME, appInfo.versionName);
        info.putInt(INFO_APPVERSIONCODE, appInfo.versionCode);
    } catch (Exception e1) {
    }
    info.putInt(INFO_SDK, Build.VERSION.SDK_INT);
    return new BackupInfo(info);
}

89. FloatLabel#onSaveInstanceState()

Project: AndroidFloatLabel
File: FloatLabel.java
@Override
protected Parcelable onSaveInstanceState() {
    final Parcelable superState = super.onSaveInstanceState();
    final Bundle saveState = new Bundle();
    saveState.putParcelable(SAVE_STATE_KEY_EDIT_TEXT, mEditText.onSaveInstanceState());
    saveState.putParcelable(SAVE_STATE_KEY_LABEL, mLabel.onSaveInstanceState());
    saveState.putBoolean(SAVE_STATE_KEY_FOCUS, mEditText.isFocused());
    saveState.putBoolean(SAVE_STATE_TAG, true);
    saveState.putParcelable(SAVE_STATE_PARENT, superState);
    return saveState;
}

90. SmartLoginConfig#pack()

Project: Android-Smart-Login
File: SmartLoginConfig.java
public Bundle pack() {
    Bundle bundle = new Bundle();
    if (appLogo != 0) {
        bundle.putInt(APPLOGO, appLogo);
    }
    bundle.putBoolean(FACEBOOKFLAG, isFacebookEnabled);
    bundle.putBoolean(GOOGLEFLAG, isGoogleEnabled);
    bundle.putString(FACEBOOKID, facebookAppId);
    bundle.putStringArrayList(FACEBOOKPERMISSIONS, facebookPermissions);
    bundle.putBoolean(CUSTOMLOGINFLAG, isCustomLoginEnabled);
    if (loginType != null) {
        bundle.putSerializable(CUSTOMLOGINTYPE, loginType);
    }
    return bundle;
}

91. NavUtils#openAlbumProfile()

Project: frostwire-android
File: NavUtils.java
/**
     * Opens the profile of an album.
     * 
     * @param context The {@link Activity} to use.
     * @param albumName The name of the album
     * @param artistName The name of the album artist
     * @param albumId The id of the album
     */
public static void openAlbumProfile(final Activity context, final String albumName, final String artistName, final long albumId) {
    // Create a new bundle to transfer the album info
    final Bundle bundle = new Bundle();
    bundle.putString(Config.ALBUM_YEAR, MusicUtils.getReleaseDateForAlbum(context, albumId));
    bundle.putString(Config.ARTIST_NAME, artistName);
    bundle.putString(Config.MIME_TYPE, MediaStore.Audio.Albums.CONTENT_TYPE);
    bundle.putLong(Config.ID, albumId);
    bundle.putString(Config.NAME, albumName);
    // Create the intent to launch the profile activity
    final Intent intent = new Intent(context, ProfileActivity.class);
    intent.putExtras(bundle);
    context.startActivity(intent);
}

92. QQShareProxy#shareToQZone()

Project: ESSocialSDK
File: QQShareProxy.java
public static void shareToQZone(Context context, String appId, String title, String summary, String url, String imageUrl, IUiListener listener) {
    Bundle params = new Bundle();
    params.putInt(QzoneShare.SHARE_TO_QZONE_KEY_TYPE, QzoneShare.SHARE_TO_QZONE_TYPE_IMAGE_TEXT);
    params.putString(QzoneShare.SHARE_TO_QQ_TITLE, title);
    params.putString(QzoneShare.SHARE_TO_QQ_SUMMARY, summary);
    params.putString(QzoneShare.SHARE_TO_QQ_TARGET_URL, url);
    ArrayList<String> imgs = new ArrayList<String>();
    imgs.add(imageUrl);
    params.putStringArrayList(QzoneShare.SHARE_TO_QQ_IMAGE_URL, imgs);
    Tencent tencent = getInstance(context, appId);
    tencent.shareToQzone((Activity) context, params, listener);
}

93. PinCodeActivityDelegateTests#testIsValid_missingCountry()

Project: digits-android
File: PinCodeActivityDelegateTests.java
public void testIsValid_missingCountry() {
    final DigitsEventDetailsBuilder eventDetailsBuilder = new DigitsEventDetailsBuilder().withAuthStartTime(1L).withLanguage("lang");
    final Bundle bundle = new Bundle();
    bundle.putParcelable(DigitsClient.EXTRA_RESULT_RECEIVER, new ResultReceiver(null));
    bundle.putParcelable(DigitsClient.EXTRA_EVENT_DETAILS_BUILDER, eventDetailsBuilder);
    bundle.putString(DigitsClient.EXTRA_PHONE, "");
    bundle.putString(DigitsClient.EXTRA_REQUEST_ID, "");
    bundle.putString(DigitsClient.EXTRA_USER_ID, "");
    assertFalse(delegate.isValid(bundle));
}

94. MainActivity#setupViewPager()

Project: android-historian
File: MainActivity.java
private void setupViewPager(ViewPager viewPager) {
    Adapter adapter = new Adapter(getSupportFragmentManager());
    Bundle args = new Bundle();
    ProductListFragment osFrag = new ProductListFragment();
    args.putInt(ProductListFragment.ARG_FRAG_TYPE, ProductListFragment.FRAG_TYPE_OS);
    osFrag.setArguments(args);
    Bundle args1 = new Bundle();
    ProductListFragment deviceFrag = new ProductListFragment();
    args1.putInt(ProductListFragment.ARG_FRAG_TYPE, ProductListFragment.FRAG_TYPE_DEVICE);
    deviceFrag.setArguments(args1);
    Bundle args2 = new Bundle();
    ProductListFragment favFrag = new ProductListFragment();
    args2.putInt(ProductListFragment.ARG_FRAG_TYPE, ProductListFragment.FRAG_TYPE_FAV);
    favFrag.setArguments(args2);
    adapter.addFragment(osFrag, "OS Version");
    adapter.addFragment(deviceFrag, "Device");
    adapter.addFragment(favFrag, "Favorites");
    viewPager.setAdapter(adapter);
}

95. BootstrapButtonGroup#onSaveInstanceState()

Project: Android-Bootstrap
File: BootstrapButtonGroup.java
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable(TAG, super.onSaveInstanceState());
    bundle.putSerializable(KEY_MODE, buttonMode);
    bundle.putSerializable(BootstrapBrand.KEY, bootstrapBrand);
    bundle.putBoolean(RoundableView.KEY, rounded);
    bundle.putBoolean(OutlineableView.KEY, outline);
    return bundle;
}

96. PinCodeActivityDelegateTests#testIsValid_missingLanguage()

Project: digits-android
File: PinCodeActivityDelegateTests.java
public void testIsValid_missingLanguage() {
    final DigitsEventDetailsBuilder eventDetailsBuilder = new DigitsEventDetailsBuilder().withAuthStartTime(1L).withCountry("US");
    final Bundle bundle = new Bundle();
    bundle.putParcelable(DigitsClient.EXTRA_RESULT_RECEIVER, new ResultReceiver(null));
    bundle.putParcelable(DigitsClient.EXTRA_EVENT_DETAILS_BUILDER, eventDetailsBuilder);
    bundle.putString(DigitsClient.EXTRA_PHONE, "");
    bundle.putString(DigitsClient.EXTRA_REQUEST_ID, "");
    bundle.putString(DigitsClient.EXTRA_USER_ID, "");
    assertFalse(delegate.isValid(bundle));
}

97. PinCodeActivityDelegateTests#testIsValid_missingAuthStartTime()

Project: digits-android
File: PinCodeActivityDelegateTests.java
public void testIsValid_missingAuthStartTime() {
    final DigitsEventDetailsBuilder eventDetailsBuilder = new DigitsEventDetailsBuilder().withLanguage("lang").withCountry("US");
    final Bundle bundle = new Bundle();
    bundle.putParcelable(DigitsClient.EXTRA_RESULT_RECEIVER, new ResultReceiver(null));
    bundle.putParcelable(DigitsClient.EXTRA_EVENT_DETAILS_BUILDER, eventDetailsBuilder);
    bundle.putString(DigitsClient.EXTRA_PHONE, "");
    bundle.putString(DigitsClient.EXTRA_REQUEST_ID, "");
    bundle.putString(DigitsClient.EXTRA_USER_ID, "");
    assertFalse(delegate.isValid(bundle));
}

98. PinCodeActivityDelegateTests#testIsValid()

Project: digits-android
File: PinCodeActivityDelegateTests.java
public void testIsValid() {
    final DigitsEventDetailsBuilder eventDetailsBuilder = new DigitsEventDetailsBuilder().withAuthStartTime(1L).withLanguage("lang").withCountry("US");
    final Bundle bundle = new Bundle();
    bundle.putParcelable(DigitsClient.EXTRA_RESULT_RECEIVER, new ResultReceiver(null));
    bundle.putParcelable(DigitsClient.EXTRA_EVENT_DETAILS_BUILDER, eventDetailsBuilder);
    bundle.putString(DigitsClient.EXTRA_PHONE, "");
    bundle.putString(DigitsClient.EXTRA_REQUEST_ID, "");
    bundle.putString(DigitsClient.EXTRA_USER_ID, "");
    assertTrue(delegate.isValid(bundle));
}

99. LoginCodeActivityDelegateTests#testIsValid_missingCountry()

Project: digits-android
File: LoginCodeActivityDelegateTests.java
public void testIsValid_missingCountry() {
    final Bundle bundle = new Bundle();
    final DigitsEventDetailsBuilder eventDetailsBuilder = new DigitsEventDetailsBuilder().withAuthStartTime(1L).withLanguage("lang");
    bundle.putParcelable(DigitsClient.EXTRA_RESULT_RECEIVER, new ResultReceiver(null));
    bundle.putString(DigitsClient.EXTRA_PHONE, "");
    bundle.putString(DigitsClient.EXTRA_REQUEST_ID, "");
    bundle.putString(DigitsClient.EXTRA_USER_ID, "");
    bundle.putParcelable(DigitsClient.EXTRA_EVENT_DETAILS_BUILDER, eventDetailsBuilder);
    assertFalse(delegate.isValid(bundle));
}

100. LoginCodeActivityDelegateTests#testIsValid_missingLanguage()

Project: digits-android
File: LoginCodeActivityDelegateTests.java
public void testIsValid_missingLanguage() {
    final Bundle bundle = new Bundle();
    final DigitsEventDetailsBuilder eventDetailsBuilder = new DigitsEventDetailsBuilder().withAuthStartTime(1L).withCountry("US");
    bundle.putParcelable(DigitsClient.EXTRA_RESULT_RECEIVER, new ResultReceiver(null));
    bundle.putString(DigitsClient.EXTRA_PHONE, "");
    bundle.putString(DigitsClient.EXTRA_REQUEST_ID, "");
    bundle.putString(DigitsClient.EXTRA_USER_ID, "");
    bundle.putParcelable(DigitsClient.EXTRA_EVENT_DETAILS_BUILDER, eventDetailsBuilder);
    assertFalse(delegate.isValid(bundle));
}