AOP且界面的绘制时间:
非AppCompatActivity中只能使用:
@Around("call(* android.app.Activity.setContentView(..))")
AppCompatActivity中才能使用:
@Around("execution(* android.app.Activity.setContentView(..))")
如果用call去监测,触发的是调用的地方,或许会比真正执行开始去监测会长那么一丁丁。
两者区别:
call:从调用处开始。
Call (Before)
Pointcut{
Pointcut Method
}
Call (After)
execution 从执行开始。
Pointcut{
execution (Before)
Pointcut Method
execution (After)
}
同时在非AppCompatActivity中获取所有控件绘制时间,不能用 getDelegate(),因为它不存在,所以只能去指定类型控件监听。
在非AppCompatActivity中获取所有控件,不知道还有啥更简洁的方式???请赐教
9455

被折叠的 条评论
为什么被折叠?



