我想知道如何从当前的活动数据传递到暂停活动。
I want to know how to pass data from the current Activity to a paused Activity.
请指教。
让我们叫暂停的活动A和当前活动B。
Let's call the paused Activity "A" and the "current" Activity "B".
有乙沟通结果为A的方式是一个叫 startActivityForResult()
而不是 startActivity()
,和B到使用的setResult()
来提供的返回值(S)。 A随后接收这些返回值的onActivityResult()
。
The way to have B communicate results to A is for A to call startActivityForResult()
instead of startActivity()
, and for B to use setResult()
to provide the return value(s). A then receives those return values in onActivityResult()
.
上一篇:自定义可更新的ListView - Android的发展自定义、ListView、Android
下一篇:TableLayoutPanel中列宽在运行时:奇怪的行为或错误奇怪、错误、行为、TableLayoutPanel