ConstraintLayout 内部视图的一半和外部视图的一半
ConstraintLayout half of a view inside and another outside
我希望我的 textview 位于另一个视图的底部,但一半在里面,一半在外面,使用约束布局。
图片:
试过基线,但只在中间对齐
app:layout_constraintBottom_toBottomOf="@+id/another_view"
app:layout_constraintTop_toBottomOf="@+id/another_view"
为文本视图设置这些属性。这里的 another_view
是要放置文本视图的视图的 ID。
它的作用是将 textview 的顶部和 textview 的底部对齐到视图的底部。
我希望我的 textview 位于另一个视图的底部,但一半在里面,一半在外面,使用约束布局。
图片:
试过基线,但只在中间对齐
app:layout_constraintBottom_toBottomOf="@+id/another_view"
app:layout_constraintTop_toBottomOf="@+id/another_view"
为文本视图设置这些属性。这里的 another_view
是要放置文本视图的视图的 ID。
它的作用是将 textview 的顶部和 textview 的底部对齐到视图的底部。