更新依赖
更新部分界面
This commit is contained in:
1 parent
82a2aa349e
commit
781615c777
31 files changed
+126
-101
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<com.google.android.material.navigationrail.NavigationRailView
|
||||
android:id="@+id/navigation_rail_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorSurfaceContainer"
|
||||
app:menuGravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -51,9 +51,11 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
style="@style/Widget.Material3.CircularProgressIndicator.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:waveAmplitude="2dp"
|
||||
app:waveSpeed="2dp"
|
||||
app:wavelength="2dp"
|
||||
android:indeterminate="true"
|
||||
app:indicatorSize="40dp" />
|
||||
|
||||
|
||||
@@ -79,11 +79,11 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
<com.google.android.material.loadingindicator.LoadingIndicator
|
||||
android:id="@+id/rotate_loading"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:indeterminate="false"
|
||||
style="@style/Widget.Material3.LoadingIndicator.Contained"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/book_info"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
||||
@@ -23,6 +23,15 @@
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tool_bar" />
|
||||
|
||||
<com.google.android.material.loadingindicator.LoadingIndicator
|
||||
android:id="@+id/loading_indicator"
|
||||
style="@style/Widget.Material3.LoadingIndicator.Contained"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="32dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp">
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_delete"
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:padding="12dp"
|
||||
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/cancel"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
android:id="@+id/tv_ok"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="16dp"
|
||||
android:padding="12dp"
|
||||
style="@style/Widget.Material3Expressive.Button.TonalButton"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/ok"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnCancel"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
style="@style/Widget.Material3Expressive.Button.OutlinedButton"
|
||||
android:text="取消"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnOk"
|
||||
style="@style/Widget.Material3.Button"
|
||||
style="@style/Widget.Material3Expressive.Button"
|
||||
android:text="确定"
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="320dp"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- 顶部标题容器 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/header_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
android:paddingVertical="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:layout_width="36dp"
|
||||
@@ -29,31 +33,45 @@
|
||||
android:text="词典"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- TabLayout -->
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent" />
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/header_layout" />
|
||||
|
||||
<!-- LoadingIndicator 居中显示 -->
|
||||
<com.google.android.material.loadingindicator.LoadingIndicator
|
||||
android:id="@+id/rotate_loading"
|
||||
style="@style/Widget.Material3.LoadingIndicator.Contained"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="32dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tab_layout" />
|
||||
|
||||
<!-- ScrollView 显示字典内容 -->
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scroll_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="64dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tab_layout">
|
||||
|
||||
<io.legato.kazusa.ui.widget.text.ScrollTextView
|
||||
android:id="@+id/tv_dict"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/rotate_loading"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -6,12 +6,11 @@
|
||||
android:padding="16dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
<com.google.android.material.loadingindicator.LoadingIndicator
|
||||
android:id="@+id/pb"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateOnly="true" />
|
||||
style="@style/Widget.Material3.LoadingIndicator.Contained"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_msg"
|
||||
|
||||
@@ -25,19 +25,18 @@
|
||||
android:id="@+id/loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.Material3.CircularProgressIndicator"
|
||||
android:indeterminate="false"
|
||||
app:indicatorSize="80dp"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"
|
||||
app:indicatorSize="64dp" />
|
||||
app:showAnimationBehavior="outward" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/retry"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
style="@style/Widget.Material3Expressive.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:padding="8dp"
|
||||
android:text="重新加载"
|
||||
android:textSize="18sp"
|
||||
android:textColor="?attr/colorSurfaceVariant"
|
||||
|
||||
@@ -7,10 +7,13 @@
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/rotate_loading"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_margin="6dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_gravity="center"
|
||||
app:waveAmplitude="2dp"
|
||||
app:waveSpeed="2dp"
|
||||
app:wavelength="2dp"
|
||||
android:visibility="invisible"
|
||||
android:indeterminate="true" />
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
<com.google.android.material.loadingindicator.LoadingIndicator
|
||||
style="@style/Widget.Material3.LoadingIndicator.Contained"
|
||||
android:id="@+id/loading_progress"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_loading_message"
|
||||
@@ -16,4 +17,5 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/dynamic_loading" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -2,6 +2,7 @@
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/theme_toggle_group"
|
||||
style="@style/Widget.Material3.MaterialButtonGroup.Connected"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
@@ -11,7 +12,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_system"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
style="@style/Widget.Material3Expressive.Button"
|
||||
app:checkedIcon="@drawable/ic_check"
|
||||
android:checkable="true"
|
||||
android:layout_width="0dp"
|
||||
@@ -21,7 +22,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_light"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
style="@style/Widget.Material3Expressive.Button"
|
||||
app:checkedIcon="@drawable/ic_check"
|
||||
android:checkable="true"
|
||||
android:layout_width="0dp"
|
||||
@@ -31,7 +32,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_dark"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
style="@style/Widget.Material3Expressive.Button"
|
||||
app:checkedIcon="@drawable/ic_check"
|
||||
android:checkable="true"
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Base.AppTheme" parent="Theme.Material3.DynamicColors.DayNight.NoActionBar">
|
||||
<style name="Base.AppTheme" parent="Theme.Material3Expressive.DynamicColors.DayNight.NoActionBar">
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
<item name="tabStyle">@style/Widget.App.TabLayout</item>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.AppTheme" parent="Theme.Material3.DynamicColors.DayNight.NoActionBar">
|
||||
<style name="Base.AppTheme" parent="Theme.Material3Expressive.DynamicColors.DayNight.NoActionBar">
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="tabStyle">@style/Widget.App.TabLayout</item>
|
||||
@@ -17,7 +17,7 @@
|
||||
<item name="chipStyle">@style/Widget.Material3.Chip.Filter</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Base.Dycolors" parent="Theme.Material3.DynamicColors.DayNight.NoActionBar">
|
||||
<style name="Theme.Base.Dycolors" parent="Theme.Material3Expressive.DynamicColors.DayNight.NoActionBar">
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
Reference in new issue
Block a user