当前位置:网站首页>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
边栏推荐
- Mba-day6 logic - hypothetical reasoning exercises
- Visual common drawing (V) scatter diagram
- 26. 删除有序数组中的重复项
- 全栈交叉编译X86完成过程经验分享
- Google Earth Engine(GEE)——将原始影像进行升尺度计算(以海南市为例)
- JVM - common parameters
- 一个微博数据库设计带来的简单思考
- 景联文科技—专业数据标注公司和智能数据标注平台
- JDBC – PreparedStatement – 如何设置 Null 值?
- Mba-day5 Mathematics - application problems - engineering problems
猜你喜欢
Visual common drawing (I) stacking diagram
精彩回顾|「源」来如此 第六期 - 开源经济与产业投资
【leetcode】102. Sequence traversal of binary tree
解决方案架构师的小锦囊 - 架构图的 5 种类型
How to quickly download vscode
Visualization Road (10) detailed explanation of segmentation canvas function
Introduction to wechat applet, development history, advantages of applet, application account, development tools, initial knowledge of wxml file and wxss file
SSH利用私钥无密钥连接服务器踩坑实录
ID number verification system based on visual structure - Raspberry implementation
Deploy jar package
随机推荐
The difference between restful and soap
Solutions to common problems in visualization (IX) background color
学习网站资料
Visual common drawing (I) stacking diagram
How to use JDBC callablestatement The wasnull () method is called to check whether the value of the last out parameter is SQL null
第六站神京门户-------手机号码的转换
MBA-day5数学-应用题-工程问题
Precautions for latex formula
How does the swagger2 interface import postman
微信小程序简介、发展史、小程序的优点、申请账号、开发工具、初识wxml文件和wxss文件
Google Earth Engine(GEE)——将原始影像进行升尺度计算(以海南市为例)
Source insight 4.0 FAQs
Learning website materials
Notes on concurrent programming of vegetables (V) thread safety and lock solution
Read integrity monitoring techniques for vision navigation systems - 4 multiple faults in vision system
Promise详解
VIM + ctags + cscope development environment construction guide
解决方案架构师的小锦囊 - 架构图的 5 种类型
Mba-day5 Mathematics - application problems - engineering problems
/etc/shadow可以破解吗?