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.
嘿伙计们,活动 A 触发活动 B 的意图,然后在活动 B 的后按时显示活动 A 的保存状态。
我想在活动 B 上按下时显示活动 A 的更新/刷新状态
然后刷新onResume()活动 A中的数据。
onResume()
您应该覆盖onResume()Activity A 中的方法并在那里更新状态。
如果您使用多个不同的活动,您还可以使用 startActivityForResult() ,然后通过覆盖 onActivityResult 方法执行结果后处理。这还使您可以选择根据结果和用户刚刚返回的活动来执行不同的任务。