当前位置:网站首页>ConstraintLayout布局
ConstraintLayout布局
2022-04-23 10:58:00 【Tenero-Forever】
- 在API9以上的Android操作系统中使用,主要是为了解决布局嵌套过多的问题而出现,以灵活的方式定位调整小部件。
- 从Android2.3起,官方模板默认使用约束布局
- constraintLayout和RelaiveLaout类似,采用相对定位的布局模式。
- 约束布局灵活性更高,且可以按照比例约束空间位置和尺寸,能更好适应屏幕大小不同的机型
基线定位

文本基线,文本对齐
两个textview空间高度不一致希望文本对齐可以使用基线定位
角度定位
边距定位
在ConstraintLayout里面实现边距定位,必须先约束相应控件在约束布局里的位置,否则将不生效(margin布局只对其相约束的view起作用)

链定位
约束布局中的控件排列方式就像一条链,链中的每一环是一个控件。

版权声明
本文为[Tenero-Forever]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_55355282/article/details/124308089
边栏推荐
- Anaconda3 installation
- MBA - day5 mathématiques - Questions d'application - Questions d'ingénierie
- Diary of dishes | Blue Bridge Cup - hexadecimal to octal (hand torn version) with hexadecimal conversion notes
- Visual common drawing (V) scatter diagram
- 期货开户哪个公司好?安全靠谱的期货公司谁能推荐几家?
- How to quickly download vscode
- Chapter 1 of technical Xiaobai (express yourself)
- Resolution and size of mainstream mobile phones
- Dirichlet prefix sum (number theory optimization formula sub complexity weapon)
- Which company is good for opening futures accounts? Who can recommend several safe and reliable futures companies?
猜你喜欢

SQL Server 递归查询上下级

Introduction to wechat applet, development history, advantages of applet, application account, development tools, initial knowledge of wxml file and wxss file

Learning note 5 - gradient explosion and gradient disappearance (k-fold cross verification)

SQL Server recursive query of superior and subordinate

《Neo4j权威指南》简介,求伯君、周鸿袆、胡晓峰、周涛等大咖隆重推荐

Visual solutions to common problems (VIII) mathematical formulas

Visual common drawing (III) area map

vm设置静态虚拟机

SSH利用私钥无密钥连接服务器踩坑实录

VIM + ctags + cscope development environment construction guide
随机推荐
期货开户哪个公司好?安全靠谱的期货公司谁能推荐几家?
MySQL how to merge the same data in the same table
Pycharm
使用zerotier让异地设备组局域网
精彩回顾|「源」来如此 第六期 - 开源经济与产业投资
任意文件读取漏洞 利用指南
Manjaro installation and configuration (vscode, wechat, beautification, input method)
Visualized common drawing (II) line chart
How can swagger2 custom parameter annotations not be displayed
SQL server query database deadlock
Solutions to common problems in visualization (IX) background color
Mba-day5 Mathematics - application problems - engineering problems
闹钟场景识别
Differences among restful, soap, RPC, SOA and microservices
SQL Server cursor circular table data
Go interface usage
景联文科技—专业数据标注公司和智能数据标注平台
[Niuke challenge 47] C. conditions (BitSet acceleration Floyd)
Learning note 5 - gradient explosion and gradient disappearance (k-fold cross verification)
Microsoft Access database using PHP PDO ODBC sample