本文整理了Java中android.content.Intent.getIntegerArrayListExtra()
方法的一些代码示例,展示了Intent.getIntegerArrayListExtra()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Intent.getIntegerArrayListExtra()
方法的具体详情如下:
包路径:android.content.Intent
类名称:Intent
方法名:getIntegerArrayListExtra
暂无
代码示例来源:origin: TommyLemon/APIJSON
private void init() {
llTopMenuWindowBg = findViewById(R.id.llTopMenuWindowBg);
llTopMenuWindowBg.setOnClickListener(this);
Intent intent = getIntent();
int[] intentCodes = intent.getIntArrayExtra(INTENT_INTENTCODES);
if (intentCodes == null || intentCodes.length <= 0) {
intentCodeList = intent.getIntegerArrayListExtra(INTENT_INTENTCODES);
} else {
intentCodeList = new ArrayList<Integer>();
for (int code : intentCodes) {
intentCodeList.add(code);
}
}
String[] menuItems = intent.getStringArrayExtra(INTENT_NAMES);
if (menuItems == null || menuItems.length <= 0) {
nameList = intent.getStringArrayListExtra(INTENT_NAMES);
} else {
nameList = new ArrayList<String>(Arrays.asList(menuItems));
}
if (nameList == null || nameList.size() <= 0) {
Log.e(TAG, "init nameList == null || nameList.size() <= 0 >> finish();return;");
finish();
return;
}
adapter = new ArrayAdapter<String>(this, R.layout.top_menu_list_item, R.id.tvTopMenuListItem, nameList);
lvTopMenu = (ListView) findViewById(R.id.lvTopMenuWindowMenu);
lvTopMenu.setAdapter(adapter);
lvTopMenu.setOnItemClickListener(this);
}
代码示例来源:origin: TommyLemon/Android-ZBLibrary
private void init() {
llTopMenuWindowBg = findViewById(R.id.llTopMenuWindowBg);
llTopMenuWindowBg.setOnClickListener(this);
Intent intent = getIntent();
int[] intentCodes = intent.getIntArrayExtra(INTENT_INTENTCODES);
if (intentCodes == null || intentCodes.length <= 0) {
intentCodeList = intent.getIntegerArrayListExtra(INTENT_INTENTCODES);
} else {
intentCodeList = new ArrayList<Integer>();
for (int code : intentCodes) {
intentCodeList.add(code);
}
}
String[] menuItems = intent.getStringArrayExtra(INTENT_NAMES);
if (menuItems == null || menuItems.length <= 0) {
nameList = intent.getStringArrayListExtra(INTENT_NAMES);
} else {
nameList = new ArrayList<String>(Arrays.asList(menuItems));
}
if (nameList == null || nameList.size() <= 0) {
Log.e(TAG, "init nameList == null || nameList.size() <= 0 >> finish();return;");
finish();
return;
}
adapter = new ArrayAdapter<String>(this, R.layout.top_menu_list_item, R.id.tvTopMenuListItem, nameList);
lvTopMenu = findViewById(R.id.lvTopMenuWindowMenu);
lvTopMenu.setAdapter(adapter);
lvTopMenu.setOnItemClickListener(this);
}
代码示例来源:origin: TommyLemon/APIJSON
idList = intent.getIntegerArrayListExtra(INTENT_ITEM_IDS);
} else {
idList = new ArrayList<Integer>();
代码示例来源:origin: TommyLemon/Android-ZBLibrary
idList = intent.getIntegerArrayListExtra(INTENT_ITEM_IDS);
} else {
idList = new ArrayList<Integer>();
代码示例来源: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: TommyLemon/Android-ZBLibrary
case REQUEST_TO_DATE_PICKER:
if (data != null) {
ArrayList<Integer> list = data.getIntegerArrayListExtra(DatePickerWindow.RESULT_DATE_DETAIL_LIST);
if (list != null && list.size() >= 3) {
case REQUEST_TO_TIME_PICKER:
if (data != null) {
ArrayList<Integer> list = data.getIntegerArrayListExtra(TimePickerWindow.RESULT_TIME_DETAIL_LIST);
if (list != null && list.size() >= 2) {
代码示例来源:origin: stackoverflow.com
@Override
public void onReceive(Context context, Intent intent)
{
position1=intent.getStringArrayListExtra("data");
lat1=intent.getIntegerArrayListExtra("lat");
lon1=intent.getIntegerArrayListExtra("lon");
}
代码示例来源:origin: JackWHLiu/jackknife
public static ArrayList<Integer> getIntegerArrayListExtra(Intent intent, String name) {
if (intent != null || !hasExtra(intent, name)) return null;
return intent.getIntegerArrayListExtra(name);
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
public static ArrayList<Integer> getIntegerArrayListExtra(Intent intent, String name) {
if (!hasIntent(intent) || !hasExtra(intent, name)) return null;
return intent.getIntegerArrayListExtra(name);
}
代码示例来源:origin: billthefarmer/currency
List<Integer> indexList = data.getIntegerArrayListExtra(CHOICE);
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* GPIOのピン選択画面を開きます.
*
* @param profileType 送信するプロファイルデータ
*/
private void openPinActivity(final int profileType) {
ProfileData data = new ProfileData();
data.setType(ProfileData.Type.getType(profileType));
Intent intent = new Intent();
intent.setClass(this, FaBoPinListActivity.class);
intent.putExtra("profile", data);
intent.putExtra("pins", getIntent().getIntegerArrayListExtra("pins"));
startActivityForResult(intent, REQUEST_CODE);
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* 指定されたピンが使用されているかを確認します.
* @param pin 使用されているか確認をするピン
* @return 使用されている場合はtrue、それ以外はfalse
*/
protected boolean usedPin(final int pin) {
if (containsPin(pin)) {
return false;
}
ArrayList<Integer> pins = getActivity().getIntent().getIntegerArrayListExtra("pins");
for (int p : pins) {
if (p == pin) {
return true;
}
}
return false;
}
代码示例来源:origin: TongmingWu/Manga
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (intent != null) {
ComicInfo info = intent.getParcelableExtra("info");
List<Integer> pos = intent.getIntegerArrayListExtra("pos");
if (info != null && pos != null) {
String comicId = info.getComic_id();
List<DownloadInfo> list = convertToDownload(info, pos);
addQueue(comicId, list);
}
}
if (manager == null) {
manager = DBManager.getInstance();
}
return super.onStartCommand(intent, flags, startId);
}
代码示例来源:origin: billthefarmer/currency
List<Integer> selectList = data.getIntegerArrayListExtra(Main.CHOICE);
代码示例来源:origin: braintree/braintree_android
@Test
public void requestAndroidPay_startsActivity() {
BraintreeFragment fragment = getSetupFragment();
Cart cart = Cart.newBuilder().build();
ArrayList<CountrySpecification> allowedCountries = new ArrayList<>();
AndroidPay.requestAndroidPay(fragment, cart, true, true, allowedCountries);
ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class);
verify(fragment).startActivityForResult(captor.capture(), eq(BraintreeRequestCodes.ANDROID_PAY));
Intent intent = captor.getValue();
assertEquals(AndroidPayActivity.class.getName(), intent.getComponent().getClassName());
assertEquals(AUTHORIZE, intent.getIntExtra(EXTRA_REQUEST_TYPE, -1));
assertEquals(WalletConstants.ENVIRONMENT_TEST, intent.getIntExtra(EXTRA_ENVIRONMENT, -1));
assertEquals("", intent.getStringExtra(EXTRA_MERCHANT_NAME));
assertEquals(cart, intent.getParcelableExtra(EXTRA_CART));
assertTrue(intent.getBooleanExtra(EXTRA_SHIPPING_ADDRESS_REQUIRED, false));
assertTrue(intent.getBooleanExtra(EXTRA_PHONE_NUMBER_REQUIRED, false));
assertEquals(allowedCountries, intent.getParcelableArrayListExtra(EXTRA_ALLOWED_COUNTRIES));
assertNotNull(intent.getParcelableExtra(EXTRA_TOKENIZATION_PARAMETERS));
assertNotNull(intent.getIntegerArrayListExtra(EXTRA_ALLOWED_CARD_NETWORKS));
}
代码示例来源:origin: Unity-Technologies/unity-ads-android
_keyEventList = getIntent().getIntegerArrayListExtra(EXTRA_KEY_EVENT_LIST);
代码示例来源:origin: braintree/braintree_android
private void loadMaskedWallet() {
MaskedWalletRequest.Builder maskedWalletRequestBuilder = MaskedWalletRequest.newBuilder()
.setMerchantName(getIntent().getStringExtra(EXTRA_MERCHANT_NAME))
.setCurrencyCode(getCart().getCurrencyCode())
.setCart(getCart())
.setEstimatedTotalPrice(getCart().getTotalPrice())
.setShippingAddressRequired(getIntent().getBooleanExtra(EXTRA_SHIPPING_ADDRESS_REQUIRED, false))
.setPhoneNumberRequired(getIntent().getBooleanExtra(EXTRA_PHONE_NUMBER_REQUIRED, false))
.setPaymentMethodTokenizationParameters((PaymentMethodTokenizationParameters) getIntent()
.getParcelableExtra(EXTRA_TOKENIZATION_PARAMETERS))
.addAllowedCardNetworks(getIntent().getIntegerArrayListExtra(EXTRA_ALLOWED_CARD_NETWORKS))
.addAllowedCountrySpecificationsForShipping((ArrayList) getIntent()
.getParcelableArrayListExtra(EXTRA_ALLOWED_COUNTRIES));
Wallet.Payments.loadMaskedWallet(mGoogleApiClient, maskedWalletRequestBuilder.build(), AUTHORIZE);
}
代码示例来源:origin: billthefarmer/currency
list = intent.getIntegerArrayListExtra(Main.CHART_LIST);
内容来源于网络,如有侵权,请联系作者删除!