Sending data back to the Main Activity in Android

后端 未结 12 1940
后悔当初
后悔当初 2020-11-22 01:36

I have two activities: main activity and child activity.
When I press a button in the main activity, the child activity is launched.

Now I want to send some dat

12条回答
  •  时光说笑
    2020-11-22 02:15

    Call the child activity Intent using the startActivityForResult() method call

    There is an example of this here: http://developer.android.com/training/notepad/notepad-ex2.html

    and in the "Returning a Result from a Screen" of this: http://developer.android.com/guide/faq/commontasks.html#opennewscreen

提交回复
热议问题