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"
运行结果:
控件在可用的空间内展开