只需将您的邮件捆绑在一起并将其传递给intent.在Next Activity的onCreate函数中提取bundle并显示.
Bundle b = new Bundle();
b.putString("message","your message");
Intent i = new Intent(this,NextActivity.class);
i.putExtras(b);
startActivity(i);
Run Code Online (Sandbox Code Playgroud)
在下一个Activity的onCreate中:
String message = (String) getIntent().getSerializableExtra("message");
Run Code Online (Sandbox Code Playgroud)
现在显示消息....
Intent i = new Intent(this, AnotherActivity.class);
startActivity(i);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7323 次 |
| 最近记录: |