2011-04-15 51 views
0

我有一個具有某些表單元素的活動。這可以從其他活動調用.. 當表單活動加載時,我怎麼知道哪一個叫它?在活動中丟失

在此先感謝..

回答

1

更簡單的方法是明確表示,在意圖:

Intent i = new Intent(blnah); 
i.putExtra("who", "Activity1"); 
startActivity(intent); 

然後,在其他活動:

// this is the activity with the form 
String who = getIntent().getStringExtra("who"); 
+0

謝謝你這麼多你的快速反應.. – XurajB 2011-04-15 15:49:04