Added drag handle

This commit is contained in:
M66B 2019-05-02 07:00:36 +02:00
parent 85a13c4ead
commit cded26344c
2 changed files with 23 additions and 3 deletions

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M20,9H4v2h16V9zM4,15h16v-2H4v2z"/>
</vector>

View File

@ -12,10 +12,20 @@
android:foreground="?attr/selectableItemBackground"
android:padding="12dp">
<ImageView
android:id="@+id/ivDragHandle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/baseline_drag_handle_24"
app:layout_constraintBottom_toBottomOf="@+id/tvTitle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tvTitle" />
<TextView
android:id="@+id/tvTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:ellipsize="middle"
android:singleLine="true"
@ -23,7 +33,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/tvSubTitle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintStart_toEndOf="@id/ivDragHandle"
app:layout_constraintTop_toTopOf="parent" />
<TextView
@ -33,8 +43,8 @@
android:maxLines="1"
android:text="Sub"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@id/tvTitle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="@id/tvTitle" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>