Files
QieKan-3.0/app/src/main/res/layout/activity_book_info_edit.xml
T
2025-07-02 04:08:42 +08:00

149 lines
6.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<io.legato.kazusa.ui.widget.TitleBar
android:id="@+id/title_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="@string/book_info_edit" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_marginHorizontal="16dp"
android:layout_marginVertical="8dp">
<io.legato.kazusa.ui.widget.image.CoverImageView
android:id="@+id/iv_cover"
android:layout_width="90dp"
android:layout_height="130dp"
android:contentDescription="@string/img_cover"
android:scaleType="centerCrop"
android:layout_marginBottom="8dp"
android:src="@drawable/image_cover_default" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_book_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:hint="@string/book_name">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_book_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_book_author"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:hint="@string/author">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_book_author"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center_vertical"
android:layout_marginBottom="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/book_type"
android:layout_marginRight="8dp"
tools:ignore="RtlHardcoded" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/sp_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:entries="@array/book_type" />
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_cover_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:hint="@string/cover_path">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_cover_url"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="16dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_select_cover"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:padding="8dp"
android:text="@string/select_local_image" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_change_cover"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_marginStart="8dp"
android:padding="8dp"
android:text="@string/change_cover_source" />
<com.google.android.material.button.MaterialButton
android:id="@+id/tv_refresh_cover"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_marginStart="8dp"
android:padding="8dp"
android:text="@string/refresh_cover" />
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_book_jj"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/book_intro">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_book_intro"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>