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

206 lines
9.1 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
2020-03-21 04:16:59 +01:00
android:id="@+id/track_details"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2020-03-21 04:16:59 +01:00
android:layout_weight="1"
android:background="?attr/background_card">
<FrameLayout
android:id="@+id/logo_container"
android:layout_width="48dp"
android:layout_height="0dp"
android:clickable="true"
android:focusable="true"
2020-03-21 04:16:59 +01:00
android:foreground="?selectableItemBackgroundBorderless"
android:gravity="center"
android:orientation="vertical"
android:padding="4dp"
app:layout_constraintBottom_toBottomOf="@id/status_container"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:background="#2E51A2">
<ImageView
android:id="@+id/track_logo"
android:layout_width="wrap_content"
2020-03-21 04:16:59 +01:00
android:contentDescription="@string/tracking"
android:layout_height="wrap_content"
android:layout_gravity="center"
tools:src="@drawable/ic_tracker_mal" />
<ProgressBar
android:id="@+id/progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="4dp"
2020-03-21 04:16:59 +01:00
android:visibility="gone" />
</FrameLayout>
2020-03-21 04:16:59 +01:00
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/status_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
2020-03-21 04:16:59 +01:00
android:background="@drawable/card_item_selector"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/logo_container"
2020-03-21 04:16:59 +01:00
app:layout_constraintTop_toTopOf="parent">
<TextView
2020-03-21 04:16:59 +01:00
android:id="@+id/track_title"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="0dp"
android:layout_height="wrap_content"
2020-03-21 04:16:59 +01:00
android:background="@drawable/card_item_selector"
android:ellipsize="end"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingTop="16dp"
android:paddingEnd="8dp"
android:paddingBottom="16dp"
android:text="@string/title"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="dfdffggjdfigjssdfgidfjgidgjdifgjfdgifdjgid" />
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/divider"
android:layout_width="0dp"
2020-03-21 04:16:59 +01:00
android:layout_height="1dp"
android:alpha="0.25"
android:background="?android:attr/textColorHint"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/logo_container"
app:layout_constraintTop_toBottomOf="@+id/status_container" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/sub_tracking_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
2020-03-21 04:16:59 +01:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider">
<TextView
2020-03-21 04:16:59 +01:00
android:id="@+id/track_status"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
2020-03-21 04:16:59 +01:00
android:background="@drawable/card_item_selector"
android:gravity="center"
android:maxLines="2"
android:paddingStart="6dp"
android:paddingTop="16dp"
android:paddingEnd="6dp"
android:paddingBottom="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/track_chapters"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Currently Reading" />
<TextView
android:id="@+id/track_chapters"
2020-03-21 04:16:59 +01:00
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/card_item_selector"
android:gravity="center"
android:paddingStart="6dp"
android:paddingEnd="6dp"
android:maxLines="2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/score_container"
app:layout_constraintStart_toEndOf="@id/track_status"
app:layout_constraintTop_toTopOf="parent"
tools:text="Chapter 12 of 24" />
<FrameLayout
android:id="@+id/score_container"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/card_item_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/track_chapters"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/track_score"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:drawableEnd="@drawable/ic_star_12dp"
android:drawableTint="?android:attr/textColorPrimary"
tools:text="10" />
</FrameLayout>
<View
android:layout_width="1dp"
android:layout_height="0dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:alpha="0.25"
android:background="?android:attr/textColorHint"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/track_status"
app:layout_constraintEnd_toStartOf="@id/track_chapters"/>
<View
android:layout_width="1dp"
android:layout_height="0dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:alpha="0.25"
android:background="?android:attr/textColorHint"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/track_chapters"
app:layout_constraintEnd_toStartOf="@id/score_container"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/add_tracking"
style="@style/Theme.Widget.Button.TextButton"
android:layout_width="0dp"
2020-03-21 04:16:59 +01:00
android:layout_height="wrap_content"
android:letterSpacing="0.0"
2020-03-22 08:15:40 +01:00
android:paddingStart="16dp"
android:paddingEnd="0dp"
2020-03-21 04:16:59 +01:00
android:text="@string/add_tracking"
android:textAlignment="textStart"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
2020-03-21 04:16:59 +01:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/logo_container"
app:layout_constraintTop_toTopOf="parent"
2020-03-21 04:16:59 +01:00
tools:visibility="visible" />
2020-03-21 04:16:59 +01:00
<androidx.constraintlayout.widget.Group
android:id="@+id/track_group"
android:layout_width="wrap_content"
2020-03-21 04:16:59 +01:00
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="sub_tracking_layout,status_container,divider" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>