0
Intent myIntent = new Intent(Main.this, Selected.class);
Main.this.startActivity(myIntent); myIntent.putExtra(「NAME」,「yeah」);我的意圖不給我什麼
當我想找回「是啊」我在其他類不起作用:
test = (TextView)findViewById(R.id.test);
String myIntentString = icicle !=null? icicle.getString("NAME"):null;
if(myIntentString==null){
Bundle extras = getIntent().getExtras();
myIntentString = extras != null ? extras.getString("NAME") : "nothing passed in";
}
test.setText(myIntentString);
是的,但我想我會像其他答案顛倒順序。 – Tsunaze 2011-01-10 08:52:28