我正在阅读我的数据库Activity A
- Fetching String
, int
, String
. 我将它传递给Activity B
并希望在 3 个文本字段中显示它的String
值得到正确显示,但是int
给了我这个错误
01-03 15:39:48.252: E/ERROR(980): android.content.res.Resources$NotFoundException: String resource ID #0x1f4
我的代码
活动一
Intent myintent2 = new Intent(MoneySummaryPage.this,EnterBankDetails.class);
myintent2.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
myintent2.putExtra("bank", updateBank);
myintent2.putExtra("amount", updateAmt);
myintent2.putExtra("Currency", updateCur);
myintent2.putExtra("constant", "1");
startActivity(myintent2);
活动 B
BankName = (EditText)findViewById(R.id.bankNameLabel);
BalanceAmount = (EditText)findViewById(R.id.balanceLabel);
currencySpin = (Spinner)findViewById(R.id.currencySpinner);
constantpass = getIntent().getExtras().getString("constant");
BankName.setText(getIntent().getExtras().getString("bank"));
BalanceAmount.setText(getIntent().getIntExtra("amount", 0));
BalanceAmount
是该字段Integer
,我在那里得到空白值。另外,我的第三个String
是要填充在 Spinner 中吗?有人可以告诉我填充它的代码吗?
谢谢!