实现LifecycleObserver 接口,然后在相应的方法上添加注解 @OnLifecycleEvent(Lifecycle.Event.XXX) 即可,XXX 就是上面七种事件。
確定! 回上一頁