|
|
@@ -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>
|