android View 绘制完成监听的实现方法
作者:lang_play 时间:2023-08-06 20:47:05
如下所示:
//view重绘时回调
view.getViewTreeObserver().addOnDrawListener(new OnDrawListener() {
@Override
public void onDraw() {
// TODO Auto-generated method stub
}
});
//view加载完成时回调
view.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
// TODO Auto-generated method stub
}
});
来源:https://blog.csdn.net/ding1145536113/article/details/52947561
标签:android,View,监听
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Android实现APP秒表功能
2022-11-13 13:58:26
![](https://img.aspxhome.com/file/2023/8/95988_0s.jpg)
c#预处理指令分析
2021-07-23 10:35:00
SpringMVC中MultipartFile转File的两种方式
2023-08-18 20:25:00
Netty如何设置为Https访问
2021-12-06 02:00:40
如何在C#9 中使用static匿名函数
2022-06-21 01:44:03
![](https://img.aspxhome.com/file/2023/4/102234_0s.png)
Android自定义一个view ViewRootImpl绘制流程示例
2023-01-04 07:47:14
![](https://img.aspxhome.com/file/2023/8/123358_0s.png)
Android viewpager 3D画廊的实现方法
2021-05-28 21:19:27
Android编程之Sdcard相关代码集锦
2022-08-15 09:55:24
Android编程实现横竖屏切换时不销毁当前activity和锁定屏幕的方法
2022-03-08 17:38:23
idea 有时提示找不到类或者符号的解决
2023-11-29 04:10:43
![](https://img.aspxhome.com/file/2023/9/60779_0s.jpg)
Java-String类最全汇总(上篇)
2023-04-15 11:47:10
![](https://img.aspxhome.com/file/2023/1/83571_0s.jpg)
Java 中 synchronized的用法详解(四种用法)
2022-03-11 08:55:05
java多线程抓取铃声多多官网的铃声数据
2023-12-18 23:20:05
![](https://img.aspxhome.com/file/2023/8/85868_0s.jpg)
C# 如何调用SAP RFC
2023-07-02 18:11:42
![](https://img.aspxhome.com/file/2023/7/70437_0s.png)
Java 由浅入深带你掌握图的遍历
2022-05-21 07:21:44
![](https://img.aspxhome.com/file/2023/8/65208_0s.png)
基于C#实现XML文件读取工具类
2021-10-07 07:42:19
Android手势密码view学习笔记(二)
2023-08-14 16:06:35
![](https://img.aspxhome.com/file/2023/4/123274_0s.jpg)
Android编程使用Service实现Notification定时发送功能示例
2023-03-12 09:54:44
使用HTTPclient保持长连接
2023-10-17 12:29:34
![](https://img.aspxhome.com/file/2023/9/64109_0s.png)
C#使用TimeSpan时间计算的简单实现
2023-10-06 07:25:55