开发者

lost in activities

I have an Activity that has some form elements. This can be called from other activities.. When the form activity loads, how do I know 开发者_JAVA技巧which one called it?

Thanks in advance..


The easier way is to explicitly indicate that in the intent:

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

Then, on the other activity:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜