当前位置:网站首页>Use the method of onlayoutchangelistener to solve the problem of gettop = 0
Use the method of onlayoutchangelistener to solve the problem of gettop = 0
2022-04-22 08:30:00 【GuoXuan_ CHN】
private val mLayoutChangeListener: View.OnLayoutChangeListener by lazy {
View.OnLayoutChangeListener { _, _, _, _, _, _, _, _, _ ->
checkPosition()
mLayout.postDelayed({
// Contact monitoring
mLayoutt.removeOnLayoutChangeListener(mLayoutChangeListener)
}, 500)
}
}
override fun initView(rootView: View) {
// Add listening
mLayout.addOnLayoutChangeListener(mLayoutChangeListener)
}
private fun checkPosition(){
val aViewY = mAView.top
val bViewtY = mBView.top + mBView.measuredHeight
}
版权声明
本文为[GuoXuan_ CHN]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220735463350.html
边栏推荐
- 使⽤airtestIDE⽣成脚本,使⽤脚本运⾏
- Simple use of fresco - simpledraweeview
- Redefine China's "core"
- 【论文阅读】【3d目标检测】Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds
- Phthalocyanine platinum CAS: 14075-08-2 | zinc phthalocyanine ZnPc | mesoporous silicon @ upconversion @ ZnPc photosensitizer, emission below 100nm 650nm
- nacos基础(4):配置nacos外部数据库
- 面经:
- Nacos Foundation (3): open API configuration management test and close Nacos service
- I feel that writing a paper is a waste of time. Do I want to write a paper?
- CAS: 36530-06-0 boron chloride phthalocyanine | phthalocyanine | boron chloride phthalocyanine | dichloroboron phthalocyanine dye | boron chloride phthalocyanine | boronsubphalocyaninichloride
猜你喜欢

Nacos Foundation (3): open API configuration management test and close Nacos service

Cloud computing learning 2 - keystone component operation and maintenance and testing

Fluorescent labeled polypeptide / amino acid (FITC modified / AMC modified) Qiyue organism

kubernetes学习笔记

qt designer 跳转,布局,样式

Redefine China's "core"

The industrialization of SCRM has accelerated, and the manufacturing industry has begun to play with private traffic

Nacos Foundation (4): configure the external database of Nacos

PWM output of STM32 to steering gear sg90

ARM裸机篇(四)——异常和中断
随机推荐
Rsync and inotify remote synchronization
winform中网络开发
nacos基础(3):OPEN API配置管理测试与关闭nacos服务
Flutter 判断网络可用性
Flutter GridView Demo
机器学习笔记 - 主成分分析中的数学
On the modification of static database
nacos基础(1):什么是配置中心&Nacos介绍
Flutter Modul类与Json相互转换
ospf四类,五类和七类LSA详解
Layer1扩容:分片和可组合性
kubernetes—pod详解
MySQL深入学习(三一):PowerDesigner的使用
Flutter ListView 加载更多
Flutter基础
Pyqt5 uses the built-in database sqllite
ARM裸机篇(四)——异常和中断
算法--删除链表的倒数第 N 个结点(Kotlin)
oh-my-notepro
Leetcode 111 Balanced binary tree (2022.04.21)