当前位置:网站首页>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.
边栏推荐
- ARM Mailbox
- SuperMap支持的国产环境汇总
- [ROS](10)ROS通信 —— 服务(Service)通信
- 基于OpenVINO工具套件简单实现YOLOv7预训练模型的部署
- Transfer Learning - Joint Geometrical and Statistical Alignment for Visual Domain Adaptation
- ".NET IoT from scratch" series
- Industry case | insurance companies of the world's top 500 construction standards can be used to drive the business analysis system
- Pisanix v0.2.0 released | Added support for dynamic read-write separation
- Access Characteristics of Constructor under Inheritance Relationship
- Programmer's list of sheep counting when insomnia | Daily anecdote
猜你喜欢
LPQ (local phase quantization) study notes
树表的查找
编译预处理等细节
SuperMap iDesktop.Net之布尔运算求交——修复含拓扑错误复杂模型
Advanced Numbers_Review_Chapter 1: Functions, Limits, Continuity
Flink 1.15.1 集群搭建(StandaloneSession)
迁移学习——Joint Geometrical and Statistical Alignment for Visual Domain Adaptation
sql语句多字段多个值如何进行排序
nodeJs--封装路由
C语言实现简单猜数字游戏
随机推荐
短域名绕过及xss相关知识
如何模拟后台API调用场景,很细!
C language diary 9 3 kinds of statements of if
优化Feed流遭遇拦路虎,是谁帮百度打破了“内存墙”?
回顾51单片机
继承关系下构造方法的访问特点
C language basics -- pointers
Unleashing the engine of technological innovation, Intel joins hands with ecological partners to promote the vigorous development of smart retail
直播回放含 PPT 下载|基于 Flink & DeepRec 构建 Online Deep Learning
蚁剑高级模块开发
the mechanism of ideology
开篇-开启全新的.NET现代应用开发体验
网络安全与元宇宙:找出薄弱环节
Fragment visibility judgment
C学生管理系统 据学号查找学生节点
Intel XDC 2022 Wonderful Review: Build an Open Ecosystem and Unleash the Potential of "Infrastructure"
[Decryption] Can the NFTs created by OpenSea for free appear in my wallet without being chained?
C学生管理系统 指定位置插入学生节点
C学生管理系统 头添加学生节点
01 [Foreword Basic Use Core Concepts]