Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在测验应用程序中有活动 1 和活动 2。活动 1 显示带有要选择的答案的问题,活动 2 是一个结果屏幕,其中我有问题链接列表。单击问题链接时,它应该显示来自活动 1 的特定问题视图
你可以用这个
Intent i = new Intent(A.this, B.class); i.putExtra(EXTRA_MESSAGE,message); startActivity(i);
在活动 B 我得到信息:
String message = getIntent().getStringExtra(EXTRA_MESSAGE);