Java Code Examples for android.os.Bundle.putIntegerArrayList()

The following are Jave code examples for showing how to use putIntegerArrayList() of the android.os.Bundle class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: BizareChat   File: MainActivity.java   View Source Code Vote up 6 votes
@Override
public void showPrivateChatRoom(DialogModel dialogModel) {
    String tag = CHAT_ROOM_FR_TAG + dialogModel.getDialogId();
    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    Fragment fragment = getSupportFragmentManager().findFragmentByTag(tag);
    if (fragment != null) {
        transaction.replace(R.id.main_screen_container, fragment, tag)
                .commit();
        return;
    }

    fragment = new ChatRoomFragment();
    Bundle args = new Bundle();
    args.putString(ChatRoomFragment.DIALOG_ID_BUNDLE_KEY, dialogModel.getDialogId());
    args.putLong(ChatRoomFragment.DIALOG_ADMIN_BUNDLE_KEY, dialogModel.getAdminId());
    args.putString(ChatRoomFragment.DIALOG_NAME_BUNDLE_KEY, dialogModel.getName());
    args.putInt(ChatRoomFragment.DIALOG_TYPE_BUNDLE_KEY, dialogModel.getType());
    args.putString(ChatRoomFragment.DIALOG_ROOM_JID_BUNDLE_KEY, dialogModel.getXmppRoomJid());
    ArrayList<Integer> list = new ArrayList<>(dialogModel.getOccupantsIds());
    args.putIntegerArrayList(ChatRoomFragment.OCCUPANTS_IDS_BUNDLE_KEY, list);

    fragment.setArguments(args);
    transaction.replace(R.id.main_screen_container, fragment, tag)
            .addToBackStack(null)
            .commit();
}
 
Example 2
Project: BizareChat   File: MainActivity.java   View Source Code Vote up 6 votes
@Override
public void showPublicChatRoom(DialogModel dialogModel) {
    String tag = CHAT_ROOM_FR_TAG + dialogModel.getDialogId();
    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
    Fragment fragment = getSupportFragmentManager().findFragmentByTag(tag);
    if (fragment != null) {
        transaction.replace(R.id.main_screen_container, fragment, tag)
                .commit();
        return;
    }

    fragment = new ChatRoomFragment();
    Bundle args = new Bundle();
    args.putString(ChatRoomFragment.DIALOG_ID_BUNDLE_KEY, dialogModel.getDialogId());
    args.putLong(ChatRoomFragment.DIALOG_ADMIN_BUNDLE_KEY, dialogModel.getAdminId());
    args.putString(ChatRoomFragment.DIALOG_NAME_BUNDLE_KEY, dialogModel.getName());
    args.putInt(ChatRoomFragment.DIALOG_TYPE_BUNDLE_KEY, dialogModel.getType());
    args.putString(ChatRoomFragment.DIALOG_ROOM_JID_BUNDLE_KEY, dialogModel.getXmppRoomJid());
    ArrayList<Integer> list = new ArrayList<>(dialogModel.getOccupantsIds());
    args.putIntegerArrayList(ChatRoomFragment.OCCUPANTS_IDS_BUNDLE_KEY, list);

    fragment.setArguments(args);
    transaction.replace(R.id.main_screen_container, fragment, tag)
            .addToBackStack(null)
            .commit();
}
 
Example 3
Project: boohee_v5.6   File: TimePickerDialog.java   View Source Code Vote up 6 votes
public void onSaveInstanceState(@NonNull Bundle outState) {
    if (this.mTimePicker != null) {
        outState.putInt(KEY_HOUR_OF_DAY, this.mTimePicker.getHours());
        outState.putInt("minute", this.mTimePicker.getMinutes());
        outState.putBoolean(KEY_IS_24_HOUR_VIEW, this.mIs24HourMode);
        outState.putInt(KEY_CURRENT_ITEM_SHOWING, this.mTimePicker.getCurrentItemShowing());
        outState.putBoolean(KEY_IN_KB_MODE, this.mInKbMode);
        if (this.mInKbMode) {
            outState.putIntegerArrayList(KEY_TYPED_TIMES, this.mTypedTimes);
        }
        outState.putString(KEY_TITLE, this.mTitle);
        outState.putBoolean(KEY_DARK_THEME, this.mThemeDark);
        outState.putInt(KEY_ACCENT, this.mAccentColor);
        outState.putBoolean(KEY_VIBRATE, this.mVibrate);
        outState.putBoolean(KEY_DISMISS, this.mDismissOnPause);
    }
}
 
Example 4
Project: IslamicLibraryAndroid   File: ReadingActivity.java   View Source Code Vote up 6 votes
private void startLocalSearch(String SearchQuery) {
    Bundle bundle = new Bundle();
    bundle.putBoolean(ARG_IS_GLOBAL_SEARCH, false);
    ArrayList<Integer> bookIds = new ArrayList<>();
    bookIds.add(bookId);
    bundle.putIntegerArrayList(SearchResultFragment.ARG_SEARCHABLE_BOOKS, bookIds);
    bundle.putString(SearchManager.QUERY, SearchQuery);
    Fragment searchResultFragment = SearchResultFragment.newInstance(bundle);
    getSupportFragmentManager()
            .beginTransaction()
            .replace(R.id.search_result_fragment_containerr, searchResultFragment, SEARCH_FRAGMENT_TAG)
            .hide(searchResultFragment)
            .addToBackStack(ADD_SEARCH_FRAGMENT_BACK_STACK_ENTRY)
            .commit()
    ;

    getSupportFragmentManager()
            .beginTransaction()
            .show(searchResultFragment)
            .addToBackStack(SHOW_SEARCH_FRAGMENT_BACKSTACK_ENTRY)
            .commit();

}
 
Example 5
Project: TimePicker   File: TimePickerDialog.java   View Source Code Vote up 5 votes
@Override
public void onSaveInstanceState(Bundle outState) {
    if (mTimePicker != null) {
        outState.putInt(KEY_HOUR_OF_DAY, mTimePicker.getHours());
        outState.putInt(KEY_MINUTE, mTimePicker.getMinutes());
        outState.putBoolean(KEY_IS_24_HOUR_VIEW, mIs24HourMode);
        outState.putInt(KEY_CURRENT_ITEM_SHOWING, mTimePicker.getCurrentItemShowing());
        outState.putBoolean(KEY_IN_KB_MODE, mInKbMode);
        if (mInKbMode) {
            outState.putIntegerArrayList(KEY_TYPED_TIMES, mTypedTimes);
        }
        outState.putBoolean(KEY_DARK_THEME, mThemeDark);
    }
}
 
Example 6
Project: IslamicLibraryAndroid   File: BrowsingActivity.java   View Source Code Vote up 5 votes
protected void startSearch(String SearchQuery) {
    Intent searchIntent = new Intent(this, SearchResultActivity.class);
    searchIntent.setAction(Intent.ACTION_SEARCH);
    Bundle bundle = new Bundle();
    bundle.putBoolean(ARG_IS_GLOBAL_SEARCH, true);
    ArrayList<Integer> selectedSearchableBooks = new ArrayList<>();

    if (shouldDisplayDownloadedOnly()) {
        selectedSearchableBooks.addAll(selectedBooksIds);
    } else {
        HashSet<Integer> downloadedHashSet = mBooksInformationDbHelper.getBookIdsDownloadedOnly();
        downloadedHashSet.retainAll(selectedBooksIds);

        if (downloadedHashSet.size() == 0) {
            Toast.makeText(this, R.string.no_downloaded_selected_books, Toast.LENGTH_SHORT).show();
            return;
        } else {
            if (downloadedHashSet.size() < selectedBooksIds.size()) {
                Toast.makeText(this, R.string.searching_downloaded_only, Toast.LENGTH_SHORT).show();
            }
            selectedSearchableBooks.addAll(downloadedHashSet);
        }
    }

    bundle.putIntegerArrayList(SearchResultFragment.ARG_SEARCHABLE_BOOKS, selectedSearchableBooks);
    bundle.putString(SearchManager.QUERY, SearchQuery);
    searchIntent.putExtras(bundle);

    startActivity(searchIntent);
}
 
Example 7
Project: IslamicLibraryAndroid   File: SearchResultFragment.java   View Source Code Vote up 5 votes
public static SearchResultFragment newInstance(boolean isGlobalSearch, ArrayList<Integer> searchableBooksIds) {
    SearchResultFragment fragment = new SearchResultFragment();
    Bundle args = new Bundle();
    args.putBoolean(ARG_IS_GLOBAL_SEARCH, isGlobalSearch);
    args.putIntegerArrayList(ARG_SEARCHABLE_BOOKS, searchableBooksIds);
    fragment.setArguments(args);
    return fragment;
}
 
Example 8
Project: GitHub   File: RxPresenter.java   View Source Code Vote up 5 votes
/**
 * {@inheritDoc}
 */
@CallSuper
@Override
protected void onSave(Bundle state) {
    for (int i = requested.size() - 1; i >= 0; i--) {
        int restartableId = requested.get(i);
        Subscription subscription = restartableSubscriptions.get(restartableId);
        if (subscription != null && subscription.isUnsubscribed())
            requested.remove(i);
    }
    state.putIntegerArrayList(REQUESTED_KEY, requested);
}
 
Example 9
Project: GitHub   File: RxPresenter.java   View Source Code Vote up 5 votes
/**
 * {@inheritDoc}
 */
@CallSuper
@Override
protected void onSave(Bundle state) {
    for (int i = requested.size() - 1; i >= 0; i--) {
        int restartableId = requested.get(i);
        Subscription subscription = restartableSubscriptions.get(restartableId);
        if (subscription != null && subscription.isUnsubscribed())
            requested.remove(i);
    }
    state.putIntegerArrayList(REQUESTED_KEY, requested);
}
 
Example 10
Project: Nird2   File: BaseContactSelectorFragment.java   View Source Code Vote up 5 votes
@Override
public void onSaveInstanceState(Bundle outState) {
	super.onSaveInstanceState(outState);
	if (adapter != null) {
		selectedContacts = adapter.getSelectedContactIds();
		outState.putIntegerArrayList(CONTACTS,
				getContactsFromIds(selectedContacts));
	}
}
 
Example 11
Project: Nird2   File: ContactSelectorActivity.java   View Source Code Vote up 5 votes
@Override
public void onSaveInstanceState(Bundle outState) {
	super.onSaveInstanceState(outState);
	if (groupId != null) {
		// save the group ID here regardless of how subclasses initialize it
		outState.putByteArray(GROUP_ID, groupId.getBytes());
	}
	if (contacts != null) {
		outState.putIntegerArrayList(CONTACTS,
				getContactsFromIds(contacts));
	}
}
 
Example 12
Project: BizareChat   File: NewChatFragment.java   View Source Code Vote up 5 votes
@Override
public void showPublicChatRoom(DialogModel dialogModel) {
    String tag = CHAT_ROOM_FR_TAG + dialogModel.getDialogId();
    FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
    Fragment fragment = getActivity().getSupportFragmentManager().findFragmentByTag(tag);
    getActivity().getSupportFragmentManager().popBackStackImmediate();
    if (fragment != null) {
        transaction.replace(R.id.main_screen_container, fragment, tag)
                .commit();
        return;
    }

    fragment = new ChatRoomFragment();
    Bundle args = new Bundle();
    args.putString(ChatRoomFragment.DIALOG_ID_BUNDLE_KEY, dialogModel.getDialogId());
    args.putLong(ChatRoomFragment.DIALOG_ADMIN_BUNDLE_KEY, dialogModel.getAdminId());
    args.putString(ChatRoomFragment.DIALOG_NAME_BUNDLE_KEY, dialogModel.getName());
    args.putInt(ChatRoomFragment.DIALOG_TYPE_BUNDLE_KEY, dialogModel.getType());
    args.putString(ChatRoomFragment.DIALOG_ROOM_JID_BUNDLE_KEY, dialogModel.getXmppRoomJid());
    ArrayList<Integer> list = new ArrayList<>(dialogModel.getOccupantsIds());
    args.putIntegerArrayList(ChatRoomFragment.OCCUPANTS_IDS_BUNDLE_KEY, list);

    fragment.setArguments(args);
    transaction.replace(R.id.main_screen_container, fragment, tag)
            .addToBackStack(null)
            .commit();
}
 
Example 13
Project: MagicBox   File: IntegerArrayListWriter.java   View Source Code Vote up 5 votes
@Override
public void write(Bundle bundle, Object to, StateField field) throws IllegalAccessException {
    Field propertyField = field.getField();
    propertyField.setAccessible(true);
    bundle.putIntegerArrayList(field.getBundleKey(), (ArrayList<Integer>) propertyField.get(to));

}
 
Example 14
Project: ImageSlider   File: SliderFragment.java   View Source Code Vote up 5 votes
public static SliderFragment createWithRes(ArrayList<Integer> imagesRes) {
    SliderFragment fragment = new SliderFragment();
    Bundle args = new Bundle();
    args.putIntegerArrayList(ALL_IMAGE_RES, imagesRes);
    fragment.setArguments(args);
    return fragment;
}
 
Example 15
Project: GitHub   File: Injector.java   View Source Code Vote up 4 votes
public void putIntegerArrayList(Bundle state, String key, ArrayList<Integer> x) {
    state.putIntegerArrayList(key + baseKey, x);
}
 
Example 16
Project: android-state   File: BundlerListInteger.java   View Source Code Vote up 4 votes
@Override
public void put(@NonNull String key, @NonNull List<Integer> value, @NonNull Bundle bundle) {
    ArrayList<Integer> arrayList = value instanceof ArrayList ? (ArrayList<Integer>) value : new ArrayList<>(value);
    bundle.putIntegerArrayList(key, arrayList);
}
 
Example 17
Project: VirtualHook   File: GhostWifiScannerImpl.java   View Source Code Vote up 4 votes
@Override
public Bundle getAvailableChannels(int band) throws RemoteException {
    Bundle bundle = new Bundle();
    bundle.putIntegerArrayList(WifiScanner.GET_AVAILABLE_CHANNELS_EXTRA.get(), new ArrayList<Integer>(0));
    return bundle;
}
 
Example 18
Project: KernelAdiutor-Mod   File: XYGraph.java   View Source Code Vote up 4 votes
@Override
protected Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putIntegerArrayList("arrayList", mPercentages);
    return super.onSaveInstanceState();
}
 
Example 19
Project: GitHub   File: SelectableAdapter.java   View Source Code Vote up 2 votes
/**
 * Saves the state of the current selection on the items.
 *
 * @param outState Current state
 * @since 1.0.0
 */
public void onSaveInstanceState(Bundle outState) {
	outState.putIntegerArrayList(TAG, new ArrayList<>(mSelectedPositions));
	if (DEBUG && getSelectedItemCount() > 0)
		Log.d(TAG, "Saving selection " + mSelectedPositions);
}
 
Example 20
Project: MyAnimeViewer   File: SelectableAdapter.java   View Source Code Vote up 2 votes
/**
 * Save the state of the current selection on the items.
 *
 * @param outState
 */
public void onSaveInstanceState(Bundle outState) {
    outState.putIntegerArrayList(TAG, selectedItems);
}