更新界面
This commit is contained in:
1 parent
8159187dc8
commit
a0b739a66b
17 files changed
+312
-89
No files matched your search
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M480,480Q513,480 536.5,456.5Q560,433 560,400Q560,367 536.5,343.5Q513,320 480,320Q447,320 423.5,343.5Q400,367 400,400Q400,433 423.5,456.5Q447,480 480,480ZM480,774Q602,662 661,570.5Q720,479 720,408Q720,299 650.5,229.5Q581,160 480,160Q379,160 309.5,229.5Q240,299 240,408Q240,479 299,570.5Q358,662 480,774ZM480,880Q319,743 239.5,625.5Q160,508 160,408Q160,258 256.5,169Q353,80 480,80Q607,80 703.5,169Q800,258 800,408Q800,508 720.5,625.5Q641,743 480,880ZM480,400Q480,400 480,400Q480,400 480,400Q480,400 480,400Q480,400 480,400Q480,400 480,400Q480,400 480,400Q480,400 480,400Q480,400 480,400Z" />
|
||||
</vector>
|
||||
@@ -1,22 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<io.legato.kazusa.ui.widget.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:contentLayout="@layout/view_tab_layout" />
|
||||
android:fitsSystemWindows="true"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_collapseMode="pin"
|
||||
app:navigationIcon="@drawable/ic_arrow_back"
|
||||
app:title="@string/chapter_list" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:background="?attr/colorSurface"
|
||||
app:tabGravity="fill"
|
||||
app:tabMode="fixed" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<!-- ViewPager 作为滚动内容 -->
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
android:layout_height="0dp"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/app_bar" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -11,48 +11,70 @@
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/ll_chapter_base_info" />
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_chapter_base_info"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cd_base"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
app:cardBackgroundColor="?attr/colorSurfaceContainer"
|
||||
app:cardElevation="8dp"
|
||||
app:strokeWidth="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_current_chapter_info"
|
||||
android:layout_width="0dp"
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_chapter_base_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="12sp" />
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="10dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_chapter_top"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
app:icon="@drawable/ic_arrow_drop_up"
|
||||
android:contentDescription="@string/go_to_top"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp" />
|
||||
<TextView
|
||||
android:id="@+id/tv_current_chapter_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_chapter_bottom"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
app:icon="@drawable/ic_arrow_drop_down"
|
||||
android:contentDescription="@string/go_to_bottom"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp" />
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_locate"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Outlined"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/locate_current"
|
||||
app:icon="@drawable/ic_locate"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_chapter_top"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/go_to_top"
|
||||
app:icon="@drawable/ic_arrow_drop_up"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_chapter_bottom"
|
||||
style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:contentDescription="@string/go_to_bottom"
|
||||
app:icon="@drawable/ic_arrow_drop_down"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -9,6 +9,7 @@
|
||||
android:id="@+id/cv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@android:color/transparent"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:src="@drawable/ic_lock_outline"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
@@ -26,33 +26,25 @@
|
||||
android:id="@+id/tv_chapter_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="2"
|
||||
app:layout_constraintBottom_toTopOf="@id/barrier"
|
||||
app:layout_constraintLeft_toRightOf="@+id/iv_locked"
|
||||
app:layout_constraintRight_toLeftOf="@+id/iv_checked"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_checked"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_locked"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="top"
|
||||
app:constraint_referenced_ids="tv_word_count,tv_tag" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_word_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:paddingEnd="18dp"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/iv_locked"
|
||||
app:layout_constraintTop_toBottomOf="@+id/barrier"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_checked"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_locked"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_chapter_name"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
@@ -63,21 +55,21 @@
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tv_word_count"
|
||||
app:layout_constraintRight_toLeftOf="@+id/iv_checked"
|
||||
app:layout_constraintTop_toBottomOf="@+id/barrier" />
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_checked"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_locked"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_word_count" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_checked"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:contentDescription="@string/success"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/ic_check"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:tint="?attr/colorSecondary"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1237,5 +1237,6 @@
|
||||
<string name="checking_update">检查更新中...</string>
|
||||
<string name="search_empty">没有内容哦</string>
|
||||
<string name="firebase_enable_title">匿名统计</string>
|
||||
<string name="locate_current">定位至当前</string>
|
||||
|
||||
</resources>
|
||||
@@ -1241,5 +1241,6 @@
|
||||
<string name="search_empty">没有内容哦</string>
|
||||
<string name="firebase_enable_title">匿名统计</string>
|
||||
<string name="firebase_enable_summary">允许应用使用Google Firebase进行崩溃和性能统计</string>
|
||||
<string name="locate_current">定位至当前</string>
|
||||
|
||||
</resources>
|
||||
@@ -66,6 +66,18 @@
|
||||
app:iconSpaceReserved="false"
|
||||
app:layout="@layout/view_preference_category">
|
||||
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationsPost"
|
||||
android:summary="@string/notification_permission_rationale"
|
||||
android:title="通知权限" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.Preference
|
||||
android:defaultValue="true"
|
||||
android:key="ignoreBatteryPermission"
|
||||
android:summary="@string/ignore_battery_permission_rationale"
|
||||
android:title="后台权限" />
|
||||
|
||||
<io.legato.kazusa.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="firebaseEnable"
|
||||
|
||||
Reference in new issue
Block a user