当前位置:网站首页>View handler stepping record
View handler stepping record
2022-08-05 02:30:00 【It's comfortable to eat】
Questions
After the view executes onDetachedFromWindow, the view instance will still exist, but the handler in the view will be empty. When the handler in the view is used, an empty judgment needs to be made
Principle
The handler of the view is obtained through view.getHandler(), as shown in the figure below, the handler is obtained from mAttachInfo, mAttachInfo is assigned in dispatchAttachedToWindow, and empty in dispatchDetachedFromWindow, where dispatchAttachedToWindow will call the view's onAttachedToWindow, and dispatchDetachedFromWindow will call the view's onAttachedToWindowonDetachedFromWindow.



Conclusion
So first of all, we need to remove the handler's runnable or callback in the view's onDetachedFromWindow. At other times when the handler is used, the handler needs to make a short judgment.
边栏推荐
- 在这个超连接的世界里,你的数据安全吗
- 关于#sql shell#的问题,如何解决?
- 回顾51单片机
- RAID磁盘阵列
- 基于OpenVINO工具套件简单实现YOLOv7预训练模型的部署
- DAY22: sqli-labs shooting range clearance wp (Less01~~Less20)
- 【LeetCode刷题】-数之和专题(待补充更多题目)
- Amazon Cloud Technology joins hands with Thundersoft to build an AIoT platform for industry customers
- leetcode-对称二叉树
- Jincang database KingbaseES V8 GIS data migration solution (3. Data migration based on ArcGIS platform to KES)
猜你喜欢
随机推荐
C student management system head to add a student node
力扣-二叉树的前序遍历、中序遍历、后序遍历
在这个超连接的世界里,你的数据安全吗
海量服务实例动态化管理
VSCode Change Default Terminal 如何修改vscode的默认terminal
多线程(2)
How to simply implement the quantization and compression of the model based on the OpenVINO POT tool
Leetcode brushing questions - 22. Bracket generation
Simple implementation of YOLOv7 pre-training model deployment based on OpenVINO toolkit
Access Characteristics of Constructor under Inheritance Relationship
J9数字货币论:web3的创作者经济是什么?
ARM Mailbox
mysql树状结构查询问题
DAY22: sqli-labs shooting range clearance wp (Less01~~Less20)
使用SuperMap iDesktopX数据迁移工具迁移ArcGIS数据
Advanced Numbers_Review_Chapter 1: Functions, Limits, Continuity
.Net C# 控制台 使用 Win32 API 创建一个窗口
LeetCode使用最小花费爬楼梯----dp问题
Understand the recommendation system in one article: Recall 06: Two-tower model - model structure, training method, the recall model is a late fusion feature, and the sorting model is an early fusion
LeetCode uses the minimum cost to climb the stairs----dp problem





![01 [Foreword Basic Use Core Concepts]](/img/90/67537d5fad28d68766ca85b887839e.png)



