- 博客(6)
- 收藏
- 关注
原创 Activity的启动流程源码解析
执行了performResume()后接着进行执行将DecorView添加到Window中,在添加完DecorView之后创建ViewRootImpl(),在这个类中执行performTraversals()在这个方法里面会执行performMeasure(),performLayout(),performDraw(),对于view进行绘制,摆放,绘制流程。Activity中的onResume()是通过调用ActivityThread().handleResumeActivity()来执行的,
2023-04-06 20:00:23 237
原创 Unhandled Exception: Looking up a deactivated widget‘s ancestor is unsafe.
Unhandled Exception: Looking up a deactivated widget’s ancestor is unsafe.At this point the state of the widget’s element tree is no longer stable. To safely refer to a widget’s ancestor in its dispose() method, save a reference to the ancestor by calling
2022-02-11 09:09:42 1567
原创 view.getLocationOnScreen(location)和view.getLocationInWindow(location)的区别
getLocationOnScreen作用
2021-12-20 19:52:31 484
原创 进入app处理粘贴板的数据
在首次进入app时,检测剪贴板中文本,在首次进入时ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);if (!clipboard.hasPrimaryClip()) {return;}ClipData clipData = clipboard.getPrimaryClip();String clipText = “”;if (clipData !
2021-12-02 20:10:29 148
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人