这个设计是一个线条布局,里面有一个新的心轴和一个背景颜色,这很简单。
单击任意视图(View 1,view 2.)其他布局是动态添加的。这些新的布局“推送”了拥有Cardview的Linearlayout。我认为这并不影响我想要达到的效果。

我想得到你在下一张图片中看到的效果。

有什么想法吗?
发布于 2018-12-17 19:16:19
,为此您需要使用ConstraintLayout
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.CardView
android:id="@+id/abc"
android:layout_width="match_parent"
android:layout_height="150dp"
app:layout_constraintTop_toTopOf="linearLayout"
app:layout_constraintBottom_toTopOf="linearLayout"/>
<LinearLayout>
....Your Layout Code.....
</LinearLayout/>
</android.support.constraint.ConstraintLayout>https://stackoverflow.com/questions/53820835
复制相似问题