当前位置:网站首页>View与ViewGroup
View与ViewGroup
2022-08-02 03:27:00 【m0_63970488】
View是Android所有控件的基类,我们平常所用的TextView和ImageView都是继承View
public class TextView extends View implements ViewTreeObserver.OnPreDrawListener {
...
}
public class ImageView extends View {
....
}接着看看我们平台常用的布局控件 LinearLayout、它继承自ViewGroup,代码如下所示。
ViewGroup 可以理解为View的组合,它可以包含很多View以及ViewGroup,而它包含的ViewGroup又可以包含View和ViewGroup。以此类推,形成一个View数
public class LinearLayout extends ViewGroup {
...
}
需要注意的是ViewGroup 也继承自View。ViewGroup作为View或者ViewGroup这些组件的容器,派生了多种布局控件子类,比如LinearLayout、RelativeLayout等。一般来说,开发Android应用的用户界面(UI)都不会直接使用View和ViewGroup,而是使用这两大基类的派生类
public abstract class ViewGroup extends View implements ViewParent, ViewManager {
...
}
边栏推荐
- Windows下MySQL数据库报“ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:8000‘ (10061)”错误解决
- 备战金九银十:Android 高级架构师的学习路线及面试题分享
- 会计凭证概述、原始凭证、原始凭证的种类、原始凭证的基本内容、原始凭证的填制要求、原始凭证的审核
- PALISADE:CKKS的使用
- SATA M2 SSD 无法安装系统的解决方法
- (1) the print () function, escape character, binary and character encoding, variables, data type, the input () function, operator
- laravel-admin 列表图片点击放大
- The roll call system and array elements find maximum and minimum values for sorting of objects
- (5) Modules and packages, encoding formats, file operations, directory operations
- (7) superficial "crawlers" process (concept + practice)
猜你喜欢

快速搭建一个网关服务,动态路由、鉴权的流程,看完秒会(含流程图)

管理会计(对内)指引、管理会计要素及其具体内容(可能考,考前记一下,推荐记一下四个大点即可)、

SQL注入(7)

laravel 写api接口时 session获取不到处理办法

Solve the problem that the 5+APP real machine test cannot access the background (same local area network)

A network security guinea pig's learning path - scripting of advanced usage of nmap

文件包含漏洞

Shuriken: 1 vulnhub walkthrough

CTF introductory notes ping

阿里技术官手码12W字面试小册
随机推荐
By figure, a (complete code at the end)
hackmyvm-hopper预排
CTF入门笔记之ping
一个网络安全小白鼠的学习之路——nmap的基本使用
机器学习1
库存现金、现金管理制度、现金的账务处理、银行存款、银行存款的账务处理、银行存款的核对
Laravel 验证唯一时排除修改时的数据
PHP hash加密与解密
Summary of php function vulnerabilities
文件上传漏洞
Alibaba Cloud MySQL 5.7 installation and some major problems (total)
还原最真实、最全面的一线大厂面试题
CTF entry md5
财产清查概述、 全面清查的情况、局部清查的情况、财产清查的方法、财产清查结果的处理
一分钟get:缓存穿透、缓存击穿、缓存雪崩
考(重点理解哪些属于其他货币资金)、其他货币资金的内容、其他货币资金的账务处理(银行汇票存款、银行本票存款、信用卡存款、信用证保证金存款、存出投资款、外埠存款)
CTF-网鼎杯往届题目
ES6 three-dot operator, array method, string extension method
命令执行漏洞
CTF入门之php文件包含