[英]How to detect the transition from one activity to another?
Im using instrumentation to control an application. 我正在使用工具来控制应用程序。 I was wondering how can I detect if a transition from activity to another is happening. 我想知道如何检测从活动到另一种活动的过渡。 Is there some type of listener ? 是否有某种类型的监听器?
the lifecycle functions can help you here 生命周期功能可以在这里为您提供帮助
Activity A will have onPause()
called, and Activity B will have onCreate()
onResume()
and onStart
called 活动A将调用onPause()
,活动B将调用onCreate()
onResume()
和onStart
you can place code in these methods to tell you stuff 您可以将代码放在这些方法中以告诉您一些东西
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.