mihon/app/src/main/res/layout/track_item.xml

179 lines
6.9 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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:id="@+id/track"
style="@style/Theme.Widget.CardView.Item"
android:padding="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/logo_container"
android:layout_width="48dp"
android:layout_height="0dp"
2020-01-24 12:18:55 -05:00
android:clickable="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:background="#2E51A2">
<ImageView
android:id="@+id/track_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
2020-01-11 22:01:26 -05:00
tools:src="@drawable/tracker_mal" />
</FrameLayout>
2020-01-24 12:18:55 -05:00
<Button
android:id="@+id/track_set"
style="@style/Theme.Widget.Button.Borderless.Small"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="16dp"
2020-01-24 12:18:55 -05:00
android:text="@string/action_edit"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/logo_container"
2020-01-24 12:18:55 -05:00
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
2020-01-24 12:18:55 -05:00
android:id="@+id/track_details"
android:layout_width="0dp"
android:layout_height="wrap_content"
2020-01-24 12:18:55 -05:00
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/logo_container"
2020-01-24 12:18:55 -05:00
app:layout_constraintTop_toTopOf="parent">
2020-01-24 12:18:55 -05:00
<LinearLayout
android:id="@+id/title_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2020-01-24 12:18:55 -05:00
android:background="?attr/selectable_list_drawable"
android:clickable="true"
android:padding="16dp">
<TextView
style="@style/TextAppearance.Regular.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title" />
<TextView
android:id="@+id/track_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:ellipsize="middle"
android:gravity="end"
android:maxLines="1"
android:text="@string/action_edit" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="?android:attr/divider" />
2020-01-24 12:18:55 -05:00
<LinearLayout
android:id="@+id/status_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2020-01-24 12:18:55 -05:00
android:background="?attr/selectable_list_drawable"
android:clickable="true"
android:padding="16dp">
<TextView
style="@style/TextAppearance.Regular.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/status" />
<TextView
android:id="@+id/track_status"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:gravity="end"
tools:text="Reading" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="?android:attr/divider" />
2020-01-24 12:18:55 -05:00
<LinearLayout
android:id="@+id/chapters_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2020-01-24 12:18:55 -05:00
android:background="?attr/selectable_list_drawable"
android:clickable="true"
android:padding="16dp">
<TextView
style="@style/TextAppearance.Regular.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/chapters" />
<TextView
android:id="@+id/track_chapters"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:gravity="end"
tools:text="12/24" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="?android:attr/divider" />
2020-01-24 12:18:55 -05:00
<LinearLayout
android:id="@+id/score_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2020-01-24 12:18:55 -05:00
android:background="?attr/selectable_list_drawable"
android:clickable="true"
android:padding="16dp">
<TextView
style="@style/TextAppearance.Regular.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/score" />
<TextView
android:id="@+id/track_score"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:gravity="end"
tools:text="10" />
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>