-1

http://pastebin.com/2vhnNJpA

誰かが私のためにこのコードを見て、別のデータを表示しようとするのを手伝ってくれませんか?class

TextView tv = (TextView)findViewById(R.id.bill_periodFrom);
tv.setText(itemisedbill.getperiodFrom());
tv = (TextView)findViewById(R.id.bill_periodTo);
tv.setText(itemisedbill.getperiodTo());
tv = (TextView)findViewById(R.id.bill_cost);
tv.setText(itemisedbill.getcost());
tv = (TextView)findViewById(R.id.bill_amountUsed);
tv.setText(itemisedbill.getamountUsed());

これは私が問題を抱えているコードのごく一部です、eclipseはitemisedbillがnullであると言います

4

2 に答える 2

0

最初のアクティビティ

Intent i = new Intent(A.this, B.class);
i.putExtra("numbers", "number");
startActivity(i);

セカンドアクティビティ

//in oncreate method
String number= getIntent().getStringExtra("numbers");

または、さらに読むには、このチュートリアルを読む必要があります:-

http://www.vogella.com/articles/AndroidIntent/article.html

于 2013-03-12T13:23:13.973 に答える
0

Android AsyncTaskをもう一度お読みください...パラメーターを間違えます。

于 2013-03-12T13:25:19.293 に答える