美文网首页
ConstraintLayout中显示不全的问题,控件被挤压

ConstraintLayout中显示不全的问题,控件被挤压

作者: 朱_c713 | 来源:发表于2020-04-22 17:16 被阅读0次

https://blog.csdn.net/FunnyLe/article/details/88896553
高度显示不全:
在ConstraintLayout中,不再建议使用match_parent属性。如果想要实现match_parent的效果,可以设置为0dp,然后通过约束来实现
<com.play.myapplication.ui.view.LoadErrorLayout
android:id="@+id/id_load"
style="@style/loadView"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/base_video_view"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
>
</com.play.myapplication.ui.view.LoadErrorLayout>

关键代码:
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"

底部显示不全的正常漏出来。

相关文章

网友评论

      本文标题:ConstraintLayout中显示不全的问题,控件被挤压

      本文链接:https://www.haomeiwen.com/subject/eprwihtx.html