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

168 lines
6.9 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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"
android:background="?android:attr/colorBackground"
android:minHeight="?attr/actionBarSize">
<FrameLayout
android:id="@+id/logo_container"
android:layout_width="48dp"
android:layout_height="0dp"
android:foreground="?selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/status_container"
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-12 04:01:26 +01:00
tools:src="@drawable/tracker_mal" />
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="4dp"
android:visibility="gone"/>
</FrameLayout>
<androidx.constraintlayout.widget.Group
android:id="@+id/track_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="chapters_container,status_container,score_container" />
<LinearLayout
android:id="@+id/status_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?attr/selectable_list_drawable"
android:clickable="true"
android:focusable="true"
android:orientation="vertical"
app:layout_constraintStart_toEndOf="@id/logo_container"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@id/chapters_container"
app:layout_constraintBottom_toBottomOf="parent"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="8dp"
android:paddingBottom="16dp">
<TextView
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/status" />
<TextView
android:id="@+id/track_status"
style="@style/TextAppearance.MaterialComponents.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
tools:text="Currently Reading" />
</LinearLayout>
<LinearLayout
android:id="@+id/chapters_container"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constrainedHeight="true"
android:background="?attr/selectable_list_drawable"
android:clickable="true"
android:focusable="true"
android:orientation="vertical"
android:paddingStart="8dp"
android:paddingTop="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/status_container"
app:layout_constraintEnd_toStartOf="@id/score_container"
app:layout_constraintBottom_toBottomOf="parent"
android:paddingEnd="8dp"
android:paddingBottom="16dp">
<TextView
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/chapters" />
<TextView
android:id="@+id/track_chapters"
style="@style/TextAppearance.MaterialComponents.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
tools:text="12/24" />
</LinearLayout>
<LinearLayout
android:id="@+id/score_container"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="?attr/selectable_list_drawable"
app:layout_constraintBottom_toBottomOf="parent"
android:clickable="true"
android:focusable="true"
android:orientation="vertical"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/chapters_container"
app:layout_constraintEnd_toStartOf="@id/track_set"
android:paddingStart="8dp"
android:paddingTop="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp">
<TextView
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/score" />
<TextView
android:id="@+id/track_score"
style="@style/TextAppearance.MaterialComponents.Body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
tools:text="10" />
</LinearLayout>
<ImageButton
android:id="@+id/track_set"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/action_edit"
android:padding="8dp"
android:tint="?android:attr/textColorSecondary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/score_container"
app:srcCompat="@drawable/ic_edit_white_24dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>