我想设计这样的东西:
如您所见,fab 位于页眉和主体之间。
使用带有 app:anchor
和 app:anchorGravity
属性的 coordinatorLayout 很容易做到这一点
但我想用constraintLayout来做。
有什么想法吗?
最佳答案
我找到了答案:))
<FAB
...
app:layout_constraintTop_toBottomOf="@+id/header"
app:layout_constraintBottom_toTopOf="@id/body"/>
关于android - 将 coordinatorLayout anchor 与 constraintLayout 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47333022/