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

399 lines
17 KiB
XML
Raw Normal View History

2020-03-02 02:44:24 +01:00
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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:id="@+id/manga_header_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:id="@+id/true_backdrop"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="@id/bottom_line"
2020-03-02 02:44:24 +01:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_min="200dp"
2020-03-02 02:44:24 +01:00
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
2020-03-02 02:44:24 +01:00
tools:background="@color/material_red_400" />
<ImageView
android:id="@+id/backdrop"
android:layout_width="0dp"
android:layout_height="0dp"
2020-03-02 02:44:24 +01:00
android:alpha="0.1"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="@+id/true_backdrop"
2020-03-02 02:44:24 +01:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/true_backdrop"
2020-03-02 02:44:24 +01:00
tools:src="@mipmap/ic_launcher" />
<View
android:id="@+id/backdrop_gradient"
android:layout_width="match_parent"
android:layout_height="300dp"
android:background="@drawable/gradient_shape"
android:backgroundTint="?android:attr/colorBackground"
app:layout_constraintBottom_toBottomOf="@+id/true_backdrop" />
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="?android:attr/colorBackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/backdrop_gradient" />
2020-03-02 02:44:24 +01:00
<View
android:id="@+id/top_view"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="0dp"
app:layout_constraintBottom_toTopOf="@id/cover_card"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
2020-03-02 02:44:24 +01:00
<com.google.android.material.card.MaterialCardView
android:id="@+id/cover_card"
android:layout_width="100dp"
2020-03-02 02:44:24 +01:00
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/top_view"
2020-03-02 02:44:24 +01:00
app:layout_constraintVertical_bias="1.0">
<ImageView
android:id="@+id/manga_cover"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:clickable="true"
android:contentDescription="@string/cover_of_image"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
2020-03-02 02:44:24 +01:00
android:maxHeight="300dp"
tools:background="@color/material_grey_700"
tools:src="@mipmap/ic_launcher" />
</com.google.android.material.card.MaterialCardView>
<TextView
android:id="@+id/manga_full_title"
style="@style/TextAppearance.MaterialComponents.Headline6"
2020-03-02 02:44:24 +01:00
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="16dp"
android:ellipsize="end"
android:maxLines="4"
android:text="@string/title"
2020-03-02 02:44:24 +01:00
android:textIsSelectable="false"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/cover_card"
2020-03-02 02:44:24 +01:00
app:layout_constraintTop_toTopOf="@id/cover_card"
tools:text="Title Example" />
<TextView
android:id="@+id/manga_author"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
2020-03-02 02:44:24 +01:00
android:ellipsize="end"
android:maxLines="2"
android:text="@string/author"
android:textAppearance="@style/TextAppearance.Regular.Body1.SemiBold"
android:textColor="?android:attr/textColorSecondary"
2020-03-02 02:44:24 +01:00
android:textIsSelectable="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/manga_full_title"
app:layout_constraintTop_toBottomOf="@+id/manga_full_title" />
2020-03-02 02:44:24 +01:00
<TextView
android:id="@+id/manga_status"
style="@style/TextAppearance.Regular.Body1.Secondary"
2020-03-02 02:44:24 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/unknown_status"
2020-03-02 02:44:24 +01:00
android:textIsSelectable="false"
app:layout_constraintStart_toStartOf="@id/manga_full_title"
app:layout_constraintTop_toBottomOf="@+id/manga_author" />
2020-03-02 02:44:24 +01:00
<com.google.android.material.textview.MaterialTextView
android:id="@+id/manga_source"
2020-03-02 02:44:24 +01:00
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
2020-03-02 02:44:24 +01:00
android:ellipsize="end"
android:maxLines="1"
android:textIsSelectable="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/manga_full_title"
app:layout_constraintTop_toBottomOf="@id/manga_status"
tools:text="Mangadex (EN)" />
2020-03-02 02:44:24 +01:00
<androidx.constraintlayout.widget.Barrier
android:id="@+id/bottom_line"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="6dp"
android:orientation="horizontal"
app:barrierDirection="bottom"
app:constraint_referenced_ids="manga_source,cover_card" />
2020-03-02 02:44:24 +01:00
<LinearLayout
android:id="@+id/button_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="14dp"
android:orientation="horizontal"
2020-03-02 02:44:24 +01:00
app:layout_constraintBottom_toTopOf="@id/manga_summary_label"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/bottom_line">
<com.google.android.material.button.MaterialButton
android:id="@+id/favorite_button"
style="@style/Theme.Widget.Button.RounededOutline"
2020-03-02 02:44:24 +01:00
android:text="@string/add_to_library"
app:icon="@drawable/ic_add_to_library_24dp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/track_button"
2020-03-02 02:44:24 +01:00
style="@style/Theme.Widget.Button.RounededOutline"
android:layout_marginStart="6dp"
android:text="@string/tracking"
2020-03-02 02:44:24 +01:00
app:icon="@drawable/ic_sync_black_24dp" />
2020-03-02 02:44:24 +01:00
<ImageView
android:id="@+id/webview_button"
2020-03-02 02:44:24 +01:00
style="@style/Theme.Widget.CustomImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="6dp"
android:layout_marginEnd="6dp"
android:contentDescription="@string/open_in_web_view"
android:padding="5dp"
android:src="@drawable/ic_open_in_webview_white_24dp"
android:tooltipText="@string/open_in_web_view" />
<ImageView
android:id="@+id/share_button"
style="@style/Theme.Widget.CustomImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="0dp"
android:layout_marginEnd="6dp"
android:contentDescription="@string/share"
android:padding="5dp"
android:src="@drawable/ic_share_white_24dp"
android:tooltipText="@string/share" />
2020-03-02 02:44:24 +01:00
</LinearLayout>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/manga_summary_label"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="16dp"
android:text="@string/description"
android:textIsSelectable="false"
android:textSize="17sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/button_layout"
tools:text="About this manga" />
<TextView
android:id="@+id/manga_summary"
style="@style/TextAppearance.Regular.Body1.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:layout_marginEnd="16dp"
android:clickable="true"
android:focusable="true"
2020-03-02 02:44:24 +01:00
android:maxLines="3"
app:layout_constraintBottom_toTopOf="@id/manga_genres_tags"
2020-03-02 02:44:24 +01:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/manga_summary_label"
tools:maxLines="10"
2020-03-02 02:44:24 +01:00
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." />
<View
android:id="@+id/more_bg_gradient"
android:layout_width="50dp"
android:layout_height="16sp"
2020-03-02 02:44:24 +01:00
android:layout_marginEnd="30dp"
android:background="@drawable/full_gradient"
android:backgroundTint="?android:attr/colorBackground"
app:layout_constraintBottom_toBottomOf="@id/manga_summary"
app:layout_constraintEnd_toEndOf="@id/more_button" />
<View
android:id="@+id/more_bg_solid"
2020-03-02 02:44:24 +01:00
android:layout_width="0dp"
android:layout_height="16sp"
android:layout_marginStart="45dp"
2020-03-02 02:44:24 +01:00
android:background="?android:attr/colorBackground"
app:layout_constraintBottom_toBottomOf="@id/manga_summary"
app:layout_constraintEnd_toEndOf="@id/more_button"
app:layout_constraintStart_toStartOf="@id/more_button" />
<View
android:id="@+id/more_guide"
android:layout_width="1dp"
android:layout_height="15sp"
app:layout_constraintEnd_toEndOf="@id/manga_summary"
app:layout_constraintTop_toBottomOf="@id/manga_summary" />
2020-03-02 02:44:24 +01:00
<com.google.android.material.button.MaterialButton
android:id="@+id/more_button"
style="@style/Theme.Widget.Button.TextButton"
2020-03-02 02:44:24 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="@string/more"
android:textAlignment="textEnd"
app:layout_constraintBottom_toBottomOf="@id/more_guide"
app:layout_constraintEnd_toEndOf="parent"
app:rippleColor="@null" />
<androidx.constraintlayout.widget.Group
android:id="@+id/more_button_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="more_button,more_bg_gradient,more_bg_solid" />
2020-03-02 02:44:24 +01:00
<androidx.constraintlayout.widget.Group
android:id="@+id/sub_item_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="start_reading_button,
manga_summary,manga_summary_label,button_layout" />
2020-03-02 02:44:24 +01:00
<me.gujun.android.taggroup.TagGroup
android:id="@+id/manga_genres_tags"
style="@style/TagGroup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:visibility="gone"
app:atg_backgroundColor="@android:color/transparent"
app:atg_borderColor="@color/md_blue_A400"
app:atg_borderStrokeWidth="1dp"
app:atg_textColor="@color/md_blue_A400"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toTopOf="@id/less_button"
2020-03-02 02:44:24 +01:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/manga_summary"
tools:layout_height="100dp"
tools:visibility="visible" />
2020-03-02 02:44:24 +01:00
<com.google.android.material.button.MaterialButton
android:id="@+id/less_button"
style="@style/Theme.Widget.Button.TextButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@string/less"
android:textAlignment="textEnd"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/start_reading_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/manga_genres_tags"
app:rippleColor="@null"
tools:visibility="visible" />
2020-03-02 02:44:24 +01:00
<com.google.android.material.button.MaterialButton
android:id="@+id/start_reading_button"
style="@style/Theme.Widget.Button.Primary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
2020-03-02 02:44:24 +01:00
android:layout_marginEnd="16dp"
android:text="@string/start_reading"
app:layout_constraintBottom_toTopOf="@id/chapter_layout"
2020-03-02 02:44:24 +01:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/less_button"
2020-03-02 02:44:24 +01:00
tools:text="Continue Reading Chapter 17.1" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/chapter_layout"
android:layout_width="match_parent"
android:layout_marginTop="12dp"
2020-03-02 02:44:24 +01:00
android:layout_height="wrap_content"
android:tooltipText="@string/sort_and_filter"
app:layout_constraintEnd_toEndOf="parent"
android:background="?selectable_list_drawable"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/start_reading_button">
2020-03-02 02:44:24 +01:00
<com.google.android.material.textview.MaterialTextView
android:id="@+id/chapters_title"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:maxLines="1"
android:text="@string/chapters"
android:textSize="17sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/filters_text"
app:layout_constraintStart_toStartOf="parent" />
<ImageView
android:id="@+id/filter_button"
android:tint="?colorAccent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:background="@null"
android:padding="5dp"
android:src="@drawable/ic_filter_list_white_24dp"
app:layout_constraintBottom_toBottomOf="@id/chapters_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/chapters_title" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/filters_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="6dp"
android:maxLines="2"
android:padding="5dp"
android:textAlignment="textEnd"
android:textColor="?android:textColorHint"
app:layout_constraintBottom_toBottomOf="@id/filter_button"
app:layout_constraintEnd_toStartOf="@id/filter_button"
app:layout_constraintStart_toEndOf="@+id/chapters_title"
app:layout_constraintTop_toTopOf="@id/filter_button"
app:layout_constraintBaseline_toBaselineOf="@id/chapters_title"
tools:text="Read, Unread, Bookmarked, Downloaded, All" />
</androidx.constraintlayout.widget.ConstraintLayout>
2020-03-02 02:44:24 +01:00
</androidx.constraintlayout.widget.ConstraintLayout>