类似上面的布局结构,你可能本意是希望ScrollView在tooolbar-view1下面,在根ConstraintLayout约束布局下如果你设置Top_toBottomof,但是实际ScrollView顶部是在ConstraintLayout顶部,而不是在tooolbar-view1底部。
其实,很简单,ScrollView RecyclerView NestedScrollView HorizontalScrollView 这些都是帧布局framelayout。肯定是在parent布局左上角快开始。
1.网上很多说根ConstraintLayout布局更换成 LinearLayout 或者 RelativeLayout。 如果习惯 约束布局 会很不上爽的
2.可以在ScrollView外包括一层约束布局这样就可以实现