当前位置:网站首页>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
边栏推荐
- UEditor之——图片上传组件大小4M的限制
- ID number verification system based on visual structure - Raspberry implementation
- 【leetcode】102.二叉树的层序遍历
- Learning notes 7-depth neural network optimization
- Kaggle - real battle of house price prediction
- Comparison and practice of prototype design of knowledge service app
- The courses bought at a high price are open! PHPer data sharing
- Solutions to common problems in visualization (VIII) solutions to problems in shared drawing area
- Visual common drawing (V) scatter diagram
- Mba-day5 Mathematics - application problems - engineering problems
猜你喜欢

比深度学习更值得信赖的模型ART

Visual common drawing (I) stacking diagram

高价买来的课程,公开了!phper资料分享

Solution architect's small bag - 5 types of architecture diagrams

Deploy jar package

Visual common drawing (III) area map

GO接口使用

STM32接电机驱动,杜邦线供电,然后反烧问题

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

Google Earth Engine(GEE)——将原始影像进行升尺度计算(以海南市为例)
随机推荐
Solutions to common problems in visualization (IX) background color
Learning Notes 6 - Summary of several deep learning convolutional neural networks
VScode
【leetcode】199. Right view of binary tree
Detailed explanation of typora Grammar (I)
Latex usage
Embedded related surface (I)
/etc/shadow可以破解吗?
How to Ping Baidu development board
Source insight 4.0 FAQs
Introduction to neo4j authoritative guide, recommended by Qiu Bojun, Zhou Hongxiang, Hu Xiaofeng, Zhou Tao and other celebrities
Charles 功能介绍和使用教程
微信小程序简介、发展史、小程序的优点、申请账号、开发工具、初识wxml文件和wxss文件
《Neo4j权威指南》简介,求伯君、周鸿袆、胡晓峰、周涛等大咖隆重推荐
MBA - day5 mathématiques - Questions d'application - Questions d'ingénierie
Microsoft Access database using PHP PDO ODBC sample
Read integrity monitoring techniques for vision navigation systems - 4 multiple faults in vision system
任意文件读取漏洞 利用指南
Data analysis learning (I) data analysis and numpy Foundation
Arbitrary file reading vulnerability exploitation Guide