当前位置: 首页>>代码示例>>Java>>正文


Java Bundle.putIntegerArrayList方法代码示例

本文整理汇总了Java中android.os.Bundle.putIntegerArrayList方法的典型用法代码示例。如果您正苦于以下问题:Java Bundle.putIntegerArrayList方法的具体用法?Java Bundle.putIntegerArrayList怎么用?Java Bundle.putIntegerArrayList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Bundle的用法示例。


在下文中一共展示了Bundle.putIntegerArrayList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showPrivateChatRoom

import android.os.Bundle; //导入方法依赖的package包/类
@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();
}
 
开发者ID:ukevgen,项目名称:BizareChat,代码行数:27,代码来源:MainActivity.java

示例2: showPublicChatRoom

import android.os.Bundle; //导入方法依赖的package包/类
@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();
}
 
开发者ID:ukevgen,项目名称:BizareChat,代码行数:27,代码来源:MainActivity.java

示例3: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:18,代码来源:TimePickerDialog.java

示例4: startLocalSearch

import android.os.Bundle; //导入方法依赖的package包/类
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();

}
 
开发者ID:fekracomputers,项目名称:IslamicLibraryAndroid,代码行数:24,代码来源:ReadingActivity.java

示例5: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@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);
    }
}
 
开发者ID:ttpho,项目名称:TimePicker,代码行数:15,代码来源:TimePickerDialog.java

示例6: startSearch

import android.os.Bundle; //导入方法依赖的package包/类
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);
}
 
开发者ID:fekracomputers,项目名称:IslamicLibraryAndroid,代码行数:31,代码来源:BrowsingActivity.java

示例7: newInstance

import android.os.Bundle; //导入方法依赖的package包/类
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;
}
 
开发者ID:fekracomputers,项目名称:IslamicLibraryAndroid,代码行数:9,代码来源:SearchResultFragment.java

示例8: onSave

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * {@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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:RxPresenter.java

示例9: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onSaveInstanceState(Bundle outState) {
	super.onSaveInstanceState(outState);
	if (adapter != null) {
		selectedContacts = adapter.getSelectedContactIds();
		outState.putIntegerArrayList(CONTACTS,
				getContactsFromIds(selectedContacts));
	}
}
 
开发者ID:rafjordao,项目名称:Nird2,代码行数:10,代码来源:BaseContactSelectorFragment.java

示例10: onSaveInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@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));
	}
}
 
开发者ID:rafjordao,项目名称:Nird2,代码行数:13,代码来源:ContactSelectorActivity.java

示例11: showPublicChatRoom

import android.os.Bundle; //导入方法依赖的package包/类
@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();
}
 
开发者ID:ukevgen,项目名称:BizareChat,代码行数:28,代码来源:NewChatFragment.java

示例12: write

import android.os.Bundle; //导入方法依赖的package包/类
@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));

}
 
开发者ID:leobert-lan,项目名称:MagicBox,代码行数:8,代码来源:IntegerArrayListWriter.java

示例13: createWithRes

import android.os.Bundle; //导入方法依赖的package包/类
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;
}
 
开发者ID:codecameo,项目名称:ImageSlider,代码行数:8,代码来源:SliderFragment.java

示例14: putIntegerArrayList

import android.os.Bundle; //导入方法依赖的package包/类
public void putIntegerArrayList(Bundle state, String key, ArrayList<Integer> x) {
    state.putIntegerArrayList(key + baseKey, x);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:Injector.java

示例15: put

import android.os.Bundle; //导入方法依赖的package包/类
@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);
}
 
开发者ID:evernote,项目名称:android-state,代码行数:6,代码来源:BundlerListInteger.java


注:本文中的android.os.Bundle.putIntegerArrayList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。