Java Code Examples for android.content.Intent.putIntegerArrayListExtra()

The following are Jave code examples for showing how to use putIntegerArrayListExtra() of the android.content.Intent 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: GitHub   File: TimePickerWindow.java   View Source Code Vote up 7 votes
@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);
}
 
Example 2
Project: GitHub   File: DatePickerWindow.java   View Source Code Vote up 7 votes
@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);
}
 
Example 3
Project: GitHub   File: TimePickerWindow.java   View Source Code Vote up 7 votes
@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);
}
 
Example 4
Project: GitHub   File: DatePickerWindow.java   View Source Code Vote up 7 votes
@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);
}
 
Example 5
Project: yyox   File: PackageActivity.java   View Source Code Vote up 7 votes
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);
    }
}
 
Example 6
Project: APIJSON-Android-RxJava   File: TimePickerWindow.java   View Source Code Vote up 7 votes
@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);
}
 
Example 7
Project: APIJSON-Android-RxJava   File: DatePickerWindow.java   View Source Code Vote up 7 votes
@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);
}
 
Example 8
Project: yyox   File: OrderDetailActivity.java   View Source Code Vote up 6 votes
@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);
    }
}
 
Example 9
Project: BlackList   File: GetContactsFragment.java   View Source Code Vote up 6 votes
@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();
}
 
Example 10
Project: Huochexing12306   File: BgdService2.java   View Source Code Vote up 6 votes
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);
	}
}
 
Example 11
Project: oma-riista-android   File: LoginActivity.java   View Source Code Vote up 6 votes
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);
}
 
Example 12
Project: TextEmoji   File: EmojiActivity.java   View Source Code Vote up 5 votes
public void viewPictures() {
    Intent intent = new Intent(this, SlidePagerActivity.class);
    intent.putExtra(SlidePagerActivity.EXTRA_TITLE, "");
    intent.putIntegerArrayListExtra(SlidePagerActivity.EXTRA_PICTURES, IMAGES);
    startActivity(intent);
}