0
点赞
收藏
分享

微信扫一扫

constrainlayout布局属性layout_constraintVertical_chainStyle=“spread_inside“的使用

王远洋 2022-05-03 阅读 43

1、界面控件之间太紧凑

2、设置constrainlayout的属性

app:layout_constraintVertical_chainStyle="spread_inside"

即:

 <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintVertical_chainStyle="spread_inside">

这段代码只在constraintLayout中的控件(即第二个输入框)设置了如下代码才会生效

app:layout_constraintBottom_toBottomOf="parent"

运行结果:

控件在可用的空间内展开

 

 

举报

相关推荐

0 条评论