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


Java Intent.putIntegerArrayListExtra方法代码示例

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


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

示例1: setResult

import android.content.Intent; //导入方法依赖的package包/类
@Override
protected void setResult() {
	intent = new Intent();

	List<String> list = containerView.getSelectedItemList();
	if (list != null) {
		ArrayList<Integer> detailList = new ArrayList<Integer>(); 
		for (int i = 0; i < list.size(); i++) {
			detailList.add(0 + Integer.valueOf(StringUtil.getNumber(list.get(i))));
		}

		Calendar calendar = Calendar.getInstance();
		calendar.set(0, 0, 0, detailList.get(0), detailList.get(1));
		intent.putExtra(RESULT_TIME_IN_MILLIS, calendar.getTimeInMillis());
		intent.putIntegerArrayListExtra(RESULT_TIME_DETAIL_LIST, detailList);
	}

	setResult(RESULT_OK, intent);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:TimePickerWindow.java

示例2: setResult

import android.content.Intent; //导入方法依赖的package包/类
@Override
protected void setResult() {
	intent = new Intent();

	List<String> list = containerView.getSelectedItemList();
	if (list != null && list.size() >= 3) {
		ArrayList<Integer> detailList = new ArrayList<Integer>(); 
		for (int i = 0; i < list.size(); i++) {
			detailList.add(0 + Integer.valueOf(StringUtil.getNumber(list.get(i))));
		}
		detailList.set(1, detailList.get(1) - 1);

		Calendar calendar = Calendar.getInstance();
		calendar.set(detailList.get(0), detailList.get(1), detailList.get(2));
		intent.putExtra(RESULT_TIME_IN_MILLIS, calendar.getTimeInMillis());
		intent.putIntegerArrayListExtra(RESULT_DATE_DETAIL_LIST, detailList);
	}

	setResult(RESULT_OK, intent);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:DatePickerWindow.java

示例3: btn_package_next_click

import android.content.Intent; //导入方法依赖的package包/类
public void btn_package_next_click(View v) {
    List<PackageItem> packageItemList = mPresenter.getSelectPackage();

    if (packageItemList.size() == 0) {
        showMessage("请选择包裹");
    } else if (packageItemList.size() < 2) {
        showMessage("合箱至少要选择两个包裹");
    } else if (!warehouseIdEqual(packageItemList)) {
        showMessage("选择的包裹必须在同一个仓库!");
    } else {
        ArrayList<Integer> list = new ArrayList<Integer>();
        for (int i = 0; i < packageItemList.size(); i++) {
            list.add(packageItemList.get(i).getId());
        }

        Intent intent = new Intent(this, PackagesDetailActivity.class);
        intent.putIntegerArrayListExtra("list", list);
        intent.putExtra("type", OrderStatus.ORDER_STATUS_PACKAGES);
        if (getIntent().getIntExtra("box", 10) == OrderStatus.ORDER_STATUS_BOX_PACKAGE) {
            intent.putExtra("box", OrderStatus.ORDER_STATUS_BOX_PACKAGE);
        }
        startActivityForResult(intent, CodeDefine.BOX_BACKAGE_REQUEST);
    }
}
 
开发者ID:Zyj163,项目名称:yyox,代码行数:25,代码来源:PackageActivity.java

示例4: onClick

import android.content.Intent; //导入方法依赖的package包/类
@Override
public void onClick(View view) {
    if (view.getId() == R.id.ll_item_order_submit_list_edit) {
        ArrayList<Integer> list = new ArrayList<Integer>();
        for (int i = 0; i < mOrderDetail.getMerchandiseList().size(); i++) {
            list.add(mOrderDetail.getMerchandiseList().get(i).getId());
        }
        Intent intent = new Intent(this, PackagesDetailActivity.class);
        intent.putIntegerArrayListExtra("list", list);
        intent.putExtra("type", OrderStatus.ORDER_STATUS_PACKAGES_EDIT);
        startActivityForResult(intent, CodeDefine.ORDER_DETAIL_PACKAGE_REQUEST);
    }
}
 
开发者ID:Zyj163,项目名称:yyox,代码行数:14,代码来源:OrderDetailActivity.java

示例5: addContacts

import android.content.Intent; //导入方法依赖的package包/类
@Override
protected void addContacts(List<Contact> contacts, LongSparseArray<ContactNumber> singleContactNumbers) {
    // prepare returning arguments - data of the chosen contacts
    ArrayList<String> names = new ArrayList<>();
    ArrayList<String> numbers = new ArrayList<>();
    ArrayList<Integer> types = new ArrayList<>();
    for (Contact contact : contacts) {
        ContactNumber contactNumber = singleContactNumbers.get(contact.id);
        if (contactNumber != null) {
            // add single number of the contact
            names.add(contact.name);
            numbers.add(contactNumber.number);
            types.add(contactNumber.type);
        } else {
            // all numbers of the contact
            for (ContactNumber _contactNumber : contact.numbers) {
                names.add(contact.name);
                numbers.add(_contactNumber.number);
                types.add(_contactNumber.type);
            }
        }
    }

    // return arguments
    Intent intent = new Intent();
    intent.putStringArrayListExtra(CONTACT_NAMES, names);
    intent.putStringArrayListExtra(CONTACT_NUMBERS, numbers);
    intent.putIntegerArrayListExtra(CONTACT_NUMBER_TYPES, types);
    getActivity().setResult(Activity.RESULT_OK, intent);
    getActivity().finish();
}
 
开发者ID:kaliturin,项目名称:BlackList,代码行数:32,代码来源:GetContactsFragment.java

示例6: startConfirmAty

import android.content.Intent; //导入方法依赖的package包/类
private void startConfirmAty(TargetInfo tInfo) {
	if (tInfo != null && tInfo.getQlnInfo() != null && mCurrMInfo != null){
		showMsg("抢票监控已检测到可用票"+SF.SUCCESS);
		MyApp.getInstance().setBgdBInfo(mBgdBInfo);
		Intent intent = new Intent(getApplicationContext(), ConfirmPassengerAty.class);
		intent.putExtra(ConfirmPassengerAty.EXTRA_TRAIN_INFO, tInfo.getQlnInfo().getQueryLeftNewDTO());
		intent.putExtra(ConfirmPassengerAty.EXTRA_TOUR_FLAG, TT.getTour_flags().get("dc"));
		intent.putExtra(ConfirmPassengerAty.EXTRA_MODE, ConfirmPassengerAty.EXTRA_MODE_MONITOR);
		intent.putIntegerArrayListExtra(ConfirmPassengerAty.EXTRA_P_NATIVE_INDEXS, (ArrayList<Integer>)mCurrMInfo.getLstPNativeIndexes());
		intent.putExtra(ConfirmPassengerAty.EXTRA_DEFAULT_SEAT_TYPE, tInfo.getSeatType());
		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		startActivity(intent);
	}
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:15,代码来源:BgdService2.java

示例7: attemptLogin

import android.content.Intent; //导入方法依赖的package包/类
public void attemptLogin(final String username, final String password) {
    LoginTask log = new LoginTask(getWorkContext(), username, password, false) {
        @Override
        public void loginFailed() {
            mLoginButton.setEnabled(true);
        }

        @Override
        public void onFinishText(String text) {
            GameDatabase.getInstance().storeCredentials(LoginActivity.this, username, password);
            Intent intent = new Intent(LoginActivity.this, MainActivity.class);
            try {
                JSONObject jObject = new JSONObject(text);
                JSONArray yearArray = jObject.getJSONArray("gameDiaryYears");
                ArrayList<Integer> eventYears = new ArrayList<>();
                for (int i = 0; i < yearArray.length(); i++) {
                    eventYears.add(yearArray.getInt(i));
                }
                intent.putIntegerArrayListExtra(EVENT_YEARS_EXTRA, eventYears);

                AppPreferences.setUserInfo(getWorkContext().getContext(), text);
            } catch (JSONException e) {
                e.printStackTrace();
            }
            replaceWithMainActivity(intent);
        }
    };
    log.start();
    mLoginButton.setEnabled(false);
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-android,代码行数:31,代码来源:LoginActivity.java

示例8: viewPictures

import android.content.Intent; //导入方法依赖的package包/类
public void viewPictures() {
    Intent intent = new Intent(this, SlidePagerActivity.class);
    intent.putExtra(SlidePagerActivity.EXTRA_TITLE, "");
    intent.putIntegerArrayListExtra(SlidePagerActivity.EXTRA_PICTURES, IMAGES);
    startActivity(intent);
}
 
开发者ID:auv1107,项目名称:TextEmoji,代码行数:7,代码来源:EmojiActivity.java


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