当前位置:网站首页>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.
边栏推荐
- C学生管理系统 头添加学生节点
- Leetcode刷题——22. 括号生成
- 从零到一快速学会三子棋
- How to create an rpm package
- 树表的查找
- [ROS] (10) ROS Communication - Service Communication
- nodeJs--encapsulate routing
- LeetCode uses the minimum cost to climb the stairs----dp problem
- Using OpenVINO to implement the flying paddle version of the PGNet inference program
- 蚁剑高级模块开发
猜你喜欢
DAY22: sqli-labs shooting range clearance wp (Less01~~Less20)
程序员失眠时的数羊列表 | 每日趣闻
leetcode 15
Opening - Open a new .NET modern application development experience
LPQ(局部相位量化)学习笔记
Common hardware delays
The 2022 EdgeX China Challenge will be grandly opened on August 3
[ROS](10)ROS通信 —— 服务(Service)通信
释放技术创新引擎,英特尔携手生态合作伙伴推动智慧零售蓬勃发展
J9数字货币论:web3的创作者经济是什么?
随机推荐
Using OpenVINO to implement the flying paddle version of the PGNet inference program
fragment可见性判断
Tree search (bintree)
DAY22: sqli-labs shooting range clearance wp (Less01~~Less20)
如何看待自己的羞愧感
【LeetCode刷题】-数之和专题(待补充更多题目)
01 【前言 基础使用 核心概念】
RAID disk array
The 2022 EdgeX China Challenge will be grandly opened on August 3
HOG特征学习笔记
DAY23: Command Execution & Code Execution Vulnerability
2022-08-04:输入:去重数组arr,里面的数只包含0~9。limit,一个数字。 返回:要求比limit小的情况下,能够用arr拼出来的最大数字。 来自字节。
力扣-二叉树的最大的深度
Leetcode刷题——22. 括号生成
Simple implementation of YOLOv7 pre-training model deployment based on OpenVINO toolkit
后期学习计划
短域名绕过及xss相关知识
"Configuration" is a double-edged sword, it will take you to understand various configuration methods
ARM Mailbox
Advanced Numbers_Review_Chapter 1: Functions, Limits, Continuity