我想制作一个像这样的时间表
我试图制作它并且它适用于match_parent
内容但是为了更少,这里没有底线是图片
这是我使用ConstraintLayout
的XML代码,我使用match_constraint
作为底线和顶行
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="@+id/card1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="@color/red"
app:cardBackgroundColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/circleImageView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textSize="20sp"
android:padding="15dp"
android:id="@+id/tv"
android:text="125125125"
/>
</android.support.v7.widget.CardView>
<View
android:layout_width="0.6dp"
android:layout_height="0dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:background="#797979"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/circleImageView"
app:layout_constraintStart_toStartOf="@+id/circleImageView"
app:layout_constraintTop_toBottomOf="@+id/circleImageView" />
<ImageView
android:id="@+id/circleImageView"
android:layout_width="6dp"
android:layout_height="6dp"
android:layout_marginEnd="4dp"
android:background="@drawable/circle_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.01"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.06999999" />
<View
android:layout_width="0.6dp"
android:layout_height="0dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:background="#797979"
app:layout_constraintBottom_toTopOf="@+id/circleImageView"
app:layout_constraintEnd_toEndOf="@+id/circleImageView"
app:layout_constraintStart_toStartOf="@+id/circleImageView"
app:layout_constraintTop_toTopOf="parent" />
任何人都可以帮我解决这个问题吗?我想在没有match_parent
内容