当前位置:网站首页>Constraintlayout's constraintset dynamically modifies constraints
Constraintlayout's constraintset dynamically modifies constraints
2022-07-03 08:21:00 【cuncaojin】
Use
establish ConstraintSet object
ConstraintSet set = new ConstraintSet(); set.clone(constraintLayout); // or // set.clone(this, R.layout.main_activity);Constraint element
set.connect(v1.getId(), ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.BOTTOM); set.connect(v2.getId(), ConstraintSet.TOP, v1.getId(), ConstraintSet.BOTTOM, dp2px(16)); set.applyTo(constraintLayout);
Be careful : If there is View Hide Show operation , Be sure to display the operation
View.setVisibility(View.VISIBLE) Not in 1、2 Execute in the middle of step, Because when establishing constraints , The previous position constraints may be changed , Thus, it shows that it may fail .
Official documents


边栏推荐
- 数据的存储
- Golang 时间格式整理
- Un système de gestion de centre commercial pour la conception de cours de technologie d'application de base de données
- Golang url的编码和解码
- E: Unable to locate package ROS melody desktop full
- Puhua PLM empowers the whole scene product lifecycle management and helps the enterprise digital transformation of the main line of products
- P1596 [USACO10OCT]Lake Counting S
- Zohocrm deluge function application time verification
- [audio and video] ijkplayer error code
- 超限黑客认知
猜你喜欢

freetype库的移植

Zohocrm deluge function application time verification

matlab神經網絡所有傳遞函數(激活函數)公式詳解

Jupyter remote server configuration and server startup
![[updating] wechat applet learning notes_ three](/img/05/958b8d62d3a42b38ca1a2d8631a7f8.png)
[updating] wechat applet learning notes_ three
![[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December](/img/51/81ceaf8746ec7455ea8abf9f038e81.jpg)
[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December

Unity2019_ Lighting system

Unity2019_ Natural ambient light_ Sky box

Data analysis exercises

Transfinite hacker cognition
随机推荐
Redis data structure
简易入手《SOM神经网络》的本质与原理
php-fpm软件的安装+openresty高速缓存搭建
Huawei interview summary during the epidemic
使用base64编码传图片
the installer has encountered an unexpected error installing this package
redis集群系列四
Golang 时间格式整理
Transplantation of tslib Library
matlab神經網絡所有傳遞函數(激活函數)公式詳解
Base64编码简介
String class
Ue5 opencv plug-in use
P2704 [noi2001] artillery position (shape pressure DP)
Xlua task list youyou
Dotween plug-in
Viz artist advanced script video tutorial -- stringmap use and vertex operation
UE4 plug in development
数据的存储
Golang中删除字符串的最后一个字符