且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将文本视图数据从第一个活动发送到第三个活动

更新时间:2023-02-06 19:07:24

如果要从第二活动开始第三活动,则必须先在第二活动中发送字符串,然后在第三活动中发送字符串.***在第二个和第三个活动中发送所有三个字符串,这样您就可以来回往复:

If you want to start 3rd activity from 2nd activity, you have to send your string in 2nd activity then 3rd activity. Better send all three string in 2nd and 3rd activity, so you can come back and forth:

String message1 = randomOne.getText().toString();
String message2 = randomTwo.getText().toString();
String message3 = randomThree.getText().toString();

check.putExtra("Extra_Message1",message1);
check.putExtra("Extra_Message2",message2);
check.putExtra("Extra_Message3",message3);

然后,您还必须将这些数据从第二活动传递到第三活动.

Then you have to pass these data from 2nd to 3rd activity also.