本文整理了Java中android.content.Intent.putIntegerArrayListExtra()
方法的一些代码示例,展示了Intent.putIntegerArrayListExtra()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Intent.putIntegerArrayListExtra()
方法的具体详情如下:
包路径:android.content.Intent
类名称:Intent
方法名:putIntegerArrayListExtra
暂无
代码示例来源:origin: androidannotations/androidannotations
public I integerArrayListExtra(String name, ArrayList<Integer> value) {
intent.putIntegerArrayListExtra(name, value);
return (I) this;
}
代码示例来源:origin: stackoverflow.com
@Override
public void onBackPressed() {
// super.onBackPressed();
Intent intent = new Intent();
intent.putIntegerArrayListExtra(SELECTION_LIST, selected);
setResult(RESULT_OK, intent);
finish();
}
代码示例来源:origin: TommyLemon/APIJSON
/**启动BottomMenuWindow的Intent
* @param context
* @param nameList
* @param idList
* @return
*/
public static Intent createIntent(Context context,
ArrayList<String> nameList, ArrayList<Integer> idList) {
return new Intent(context, BottomMenuWindow.class).
putStringArrayListExtra(INTENT_ITEMS, nameList).
putIntegerArrayListExtra(INTENT_ITEM_IDS, idList);
}
代码示例来源:origin: TommyLemon/Android-ZBLibrary
/**启动BottomMenuWindow的Intent
* @param context
* @param nameList
* @param idList
* @return
*/
public static Intent createIntent(Context context,
ArrayList<String> nameList, ArrayList<Integer> idList) {
return new Intent(context, BottomMenuWindow.class).
putStringArrayListExtra(INTENT_ITEMS, nameList).
putIntegerArrayListExtra(INTENT_ITEM_IDS, idList);
}
代码示例来源:origin: TommyLemon/Android-ZBLibrary
/**启动TopMenuWindow的Intent
* @param context
* @param nameList
* @param intentCodeList
* @return
*/
public static Intent createIntent(Context context,
ArrayList<String> nameList, ArrayList<Integer> intentCodeList) {
return new Intent(context, TopMenuWindow.class).
putStringArrayListExtra(INTENT_NAMES, nameList).
putIntegerArrayListExtra(INTENT_INTENTCODES, intentCodeList);
}
代码示例来源:origin: TommyLemon/APIJSON
/**启动TopMenuWindow的Intent
* @param context
* @param title - 非必需
* @param nameList
* @param intentCodeList
* @return
*/
public static Intent createIntent(Context context,
ArrayList<String> nameList, ArrayList<Integer> intentCodeList) {
return new Intent(context, TopMenuWindow.class).
putStringArrayListExtra(INTENT_NAMES, nameList).
putIntegerArrayListExtra(INTENT_INTENTCODES, intentCodeList);
}
代码示例来源:origin: TommyLemon/APIJSON
@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);
}
代码示例来源:origin: TommyLemon/APIJSON
@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);
}
代码示例来源:origin: TommyLemon/Android-ZBLibrary
@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);
}
代码示例来源:origin: TommyLemon/Android-ZBLibrary
@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);
}
代码示例来源:origin: robolectric/robolectric
@Test
public void putIntegerArrayListExtra_addsListToExtras() {
Intent intent = new Intent();
final ArrayList<Integer> integers = new ArrayList<>(Arrays.asList(100, 200, 300));
intent.putIntegerArrayListExtra("KEY", integers);
assertThat(intent.getIntegerArrayListExtra("KEY")).isEqualTo(integers);
assertThat(intent.getExtras().getIntegerArrayList("KEY")).isEqualTo(integers);
}
代码示例来源:origin: org.androidannotations/androidannotations-api
public I integerArrayListExtra(String name, ArrayList<Integer> value) {
intent.putIntegerArrayListExtra(name, value);
return (I) this;
}
代码示例来源:origin: VictorChow/SmartGo
public BuildExtras putInt(String name, ArrayList<Integer> value) {
((Intent) SmartPath.entity.intent).putIntegerArrayListExtra(name, value);
return this;
}
代码示例来源:origin: stackoverflow.com
@Override
public void onBackPressed() {
Intent intent = new Intent();
intent.putIntegerArrayListExtra(SELECTION_LIST, selected);
setResult(RESULT_OK, intent);
super.onBackPressed();
}
代码示例来源:origin: stackoverflow.com
@Override
public void onBackPressed() {
super.onBackPressed();
Intent intent = new Intent();
intent.putIntegerArrayListExtra(SELECTION_LIST, selected);
setResult(RESULT_OK, intent);
}
代码示例来源:origin: stackoverflow.com
// Intent with Conetxt of the Asyntask class and
if (routes != null && !routes.isEmpty()) {
Intent intent = new Intent(mContext, MainActivity.class);
intent.putIntegerArrayListExtra("stop_route", routes);
intent.putExtra("stop_distance", distance);
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
mContext.startActivity(intent);
} else {
Log.e("123", "Avoiding null pointer, the routes are null!!!");
}
代码示例来源:origin: stackoverflow.com
ArrayList<Integer> deletedPositions = new ArrayList<>();
Intent intent=new Intent();
intent.putExtra("isdeleted",true);
intent.putIntegerArrayListExtra("pos",deletedPositions);
setResult(2,intent);
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* ピンの設定画面を開きます.
*
* @param profileData 設定画面
*/
private void openPinActivity(final ProfileData profileData) {
Intent intent = new Intent();
intent.setClass(this, FaBoPinListActivity.class);
intent.putExtra("profile", profileData);
intent.putIntegerArrayListExtra("pins", new ArrayList<>(getUsePins()));
startActivityForResult(intent, REQUEST_CODE_UPDATE_PROFILE);
}
代码示例来源:origin: TongmingWu/Manga
private void download() {
List<Integer> downloadPos = adapter.getSelectionPos();
//添加下载任务
Intent intent = new Intent(this, DownloadManager.class);
intent.putExtra("info", info);
intent.putIntegerArrayListExtra("pos", (ArrayList<Integer>) downloadPos);
startService(intent);
Toast.makeText(this, "开始下载", Toast.LENGTH_SHORT).show();
finish();
}
代码示例来源:origin: stackoverflow.com
Intent i = new Intent(context,SecondActivity.class);
i.putIntegerArrayListExtra(name, value);
i.putStringArrayListExtra(name, value);
i.putParcelableArrayListExtra(name, value);
内容来源于网络,如有侵权,请联系作者删除!