Files
XMBOX/app/src/mobile/res/layout/activity_collect.xml
T
您的名字 ca95128ee9 feat: 全面优化应用稳定性和用户体验
🐛 核心修复:
- 修复 VodConfig/LiveConfig 空指针崩溃问题
- 添加构造函数初始化列表,防止 clear() 方法空指针异常
- 增强 Setting 类隐私协议状态管理

🎨 UI/UX 改进:
- 新增隐私协议页面 (PrivacyAgreementActivity)
- 修复按钮文字显示不完整问题(调整文字大小和按钮高度)
- 空状态动画位置优化(向上移动40dp)
- TV版选集按钮选中状态文字改为黄色显示

🌟 空状态优化:
- 恢复完整的 Lottie 空状态动画 (54KB)
- 新增多个空状态布局:搜索、收藏、通用
- 更新空状态文案为川渝方言风格:'这里撒子内容都没得~'

📺 TV版本优化:
- 新增专用颜色选择器 episode_text.xml
- 选集按钮选中状态文字颜色改为黄色 (#FFEB3B)
- 仅影响视频详情页,不干扰其他页面

🔧 技术改进:
- 优化生命周期管理和错误处理
- 增强任务栈管理,防止用户返回协议页面
- 添加空值安全检查,提升应用稳定性

版本:v3.0.7 - 包含所有修复和优化的稳定版本
2025-09-26 13:19:13 +08:00

168 lines
6.5 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:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:fitsSystemWindows="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<EditText
android:id="@+id/keyword"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:hint="@string/search_keyword"
android:imeOptions="actionDone"
android:inputType="textCapWords|textAutoCorrect|textAutoComplete"
android:letterSpacing="0.02"
android:maxLength="255"
android:singleLine="true"
android:textColor="@color/white"
android:textColorHint="@color/white"
android:textCursorDrawable="@drawable/shape_cursor"
android:textSize="20sp" />
<ImageView
android:id="@+id/site"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:src="@drawable/ic_action_site" />
<ImageView
android:id="@+id/view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:src="@drawable/ic_action_list"
android:visibility="gone"
tools:visibility="visible" />
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/agent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
tools:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/record"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="@string/search_record"
android:textColor="@color/white"
android:textSize="18sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recordRecycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-8dp"
android:clipChildren="false"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp"
tools:itemCount="5"
tools:listitem="@layout/adapter_collect_record" />
<TextView
android:id="@+id/word"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:text="@string/search_hot"
android:textColor="@color/white"
android:textSize="18sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/wordRecycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="-8dp"
android:clipChildren="false"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp"
tools:itemCount="5"
tools:listitem="@layout/adapter_collect_word" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<RelativeLayout
android:id="@+id/result"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
tools:visibility="visible">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/collect"
android:layout_width="120dp"
android:layout_height="match_parent"
android:layout_marginTop="-8dp"
android:clipChildren="false"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingStart="8dp"
android:paddingEnd="0dp"
android:paddingBottom="8dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/adapter_collect" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="-8dp"
android:layout_toEndOf="@+id/collect"
android:clipChildren="false"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingStart="0dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2"
tools:listitem="@layout/adapter_vod_rect" />
<!-- 搜索结果空状态Lottie动画 -->
<include
android:id="@+id/emptyLayout"
layout="@layout/view_empty_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="-40dp"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>