237 lines
11 KiB
XML
237 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?><!--
|
|
~ Copyright 2015 Hippo Seven
|
|
~
|
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
|
~ you may not use this file except in compliance with the License.
|
|
~ You may obtain a copy of the License at
|
|
~
|
|
~ http://www.apache.org/licenses/LICENSE-2.0
|
|
~
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
~ distributed under the License is distributed on an "AS IS" BASIS,
|
|
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
~ See the License for the specific language governing permissions and
|
|
~ limitations under the License.
|
|
-->
|
|
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:id="@+id/header"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical">
|
|
|
|
<View
|
|
android:id="@+id/color_bg"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:elevation="4dp"
|
|
app:fitsSystemWindowsInsets="top" />
|
|
|
|
<Space
|
|
android:layout_width="match_parent"
|
|
android:layout_height="28dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:id="@+id/title"
|
|
style="@style/TextAppearance.Material3.HeadlineSmall"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="@dimen/keyline_margin"
|
|
android:layout_marginRight="@dimen/keyline_margin"
|
|
android:ellipsize="end"
|
|
android:maxLines="5" />
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="@style/Widget.Material3.CardView.Elevated"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="@dimen/keyline_margin"
|
|
android:layout_marginTop="@dimen/keyline_margin"
|
|
android:layout_marginRight="@dimen/keyline_margin"
|
|
android:layout_marginBottom="@dimen/keyline_margin"
|
|
app:fitsSystemWindowsInsets="top">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/header_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/thumb_card"
|
|
style="@style/Widget.Material3.CardView.Filled"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<com.hippo.ehviewer.widget.FixedThumb
|
|
android:id="@+id/thumb"
|
|
android:layout_width="@dimen/gallery_detail_thumb_width"
|
|
android:layout_height="@dimen/gallery_detail_thumb_height"
|
|
app:alwaysCutAndScale="true"/>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/info"
|
|
style="@style/Widget.Material3.CardView.Filled"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginEnd="@dimen/keyline_margin"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:orientation="vertical"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:padding="8dp">
|
|
|
|
<TextView
|
|
android:id="@+id/language"
|
|
style="@style/TextAppearance.Material3.BodySmall"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="start"
|
|
android:singleLine="true"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<TextView
|
|
android:id="@+id/size"
|
|
style="@style/TextAppearance.Material3.BodySmall"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16dp"
|
|
android:gravity="end"
|
|
android:singleLine="true"
|
|
app:layout_constraintBaseline_toBaselineOf="@id/language"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintHorizontal_bias="1.0"
|
|
app:layout_constraintStart_toEndOf="@id/language" />
|
|
|
|
|
|
<TextView
|
|
android:id="@+id/favoredTimes"
|
|
style="@style/TextAppearance.Material3.BodySmall"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:gravity="start"
|
|
android:singleLine="true"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/language" />
|
|
|
|
<TextView
|
|
android:id="@+id/pages"
|
|
style="@style/TextAppearance.Material3.BodySmall"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="16dp"
|
|
android:gravity="end"
|
|
android:singleLine="true"
|
|
app:layout_constraintBaseline_toBaselineOf="@id/favoredTimes"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintHorizontal_bias="1.0"
|
|
app:layout_constraintStart_toEndOf="@id/favoredTimes" />
|
|
|
|
|
|
<TextView
|
|
android:id="@+id/posted"
|
|
style="@style/TextAppearance.Material3.BodySmall"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:gravity="center"
|
|
android:singleLine="true"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/favoredTimes" />
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.google.android.material.chip.Chip
|
|
android:id="@+id/uploader"
|
|
style="@style/Widget.Material3.Chip.Assist"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="@dimen/keyline_margin"
|
|
android:ellipsize="end"
|
|
android:singleLine="true"
|
|
android:textAllCaps="true"
|
|
app:chipIcon="@drawable/file_upload_black_24dp"
|
|
app:ensureMinTouchTargetSize="true"
|
|
app:layout_constraintBottom_toBottomOf="@id/thumb_card"
|
|
app:layout_constraintEnd_toEndOf="parent" />
|
|
|
|
<com.google.android.material.chip.Chip
|
|
android:id="@+id/category"
|
|
style="@style/Widget.Material3.Chip.Assist"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="@dimen/keyline_margin"
|
|
app:chipSpacingHorizontal="8dp"
|
|
android:ellipsize="end"
|
|
android:singleLine="true"
|
|
android:textAllCaps="true"
|
|
app:chipIcon="@drawable/ic_baseline_label_24"
|
|
app:ensureMinTouchTargetSize="true"
|
|
app:layout_constraintBottom_toTopOf="@id/uploader"
|
|
app:layout_constraintEnd_toEndOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/action_card"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginLeft="@dimen/keyline_margin"
|
|
android:layout_marginRight="@dimen/keyline_margin"
|
|
android:orientation="horizontal">
|
|
|
|
<Button
|
|
android:id="@+id/download"
|
|
style="@style/Widget.Material3.Button.TonalButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="4dp"
|
|
android:layout_weight="1"
|
|
android:clickable="true"
|
|
android:focusable="true" />
|
|
|
|
<Button
|
|
android:id="@+id/read"
|
|
style="@style/Widget.Material3.Button"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginHorizontal="4dp"
|
|
android:layout_weight="1"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:text="@string/read" />
|
|
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</FrameLayout>
|