feat(fragment): 新增 DbInspectFragment 本地数据库调试查看功能
- 新增 DbInspectFragment,支持按表切换(菜品/食材/调料/槽位)查看全量数据 - 分页加载(每页 50 条)+ isDel 过滤开关,避免大数据量时内存占用过高 - 切换 Tab 立即清空旧数据防止闪现,loadMoreDbInspect 加并发保护 - 槽位表字段少无 isDel,切换到该 Tab 时自动隐藏 isDel 相关控件 - 菜品/食材/调料表字段改为每行 3 列紧凑布局,槽位表保持逐行显示 - SettingActivity 新增"数据库查看"入口,复用 SingleFragmentActivity 承载 - 4 个 DAO 新增分页查询及计数方法,DbRepository/DbViewModel 同步扩展 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,37 @@
|
||||
tools:ignore="ContentDescription" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llDbInspect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:background="@drawable/shape_white_dc_15_corners"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="数据库查看"
|
||||
android:textSize="32sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="32dp"
|
||||
android:textColor="@color/black333" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/ic_arrow_right3"
|
||||
tools:ignore="ContentDescription" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- <!– 底部导航菜单 –>-->
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/bottomMenu"-->
|
||||
|
||||
Reference in New Issue
Block a user