From c8e55730f392a9902d346acc6d3ea7377616f850 Mon Sep 17 00:00:00 2001 From: MiMo Date: Sat, 18 Jul 2026 20:05:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E8=AF=95=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=BB=84=E6=B7=BB=E5=8A=A0=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E8=8D=89=E7=A8=BF=E9=A2=84=E8=A7=88=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在DebugToolButtonsView中新增布局草稿按钮, 点击后跳转LayoutDraftPreViewActivity窗口。 --- contacts/build.properties | 4 ++-- .../contacts/views/DebugToolButtonsView.java | 22 +++++++++++++++++++ .../res/layout/view_debug_tool_buttons.xml | 16 ++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/contacts/build.properties b/contacts/build.properties index 93caf10..64ea42b 100644 --- a/contacts/build.properties +++ b/contacts/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Sat Jul 18 19:53:07 CST 2026 +#Sat Jul 18 20:03:10 CST 2026 stageCount=11 libraryProject= baseVersion=15.20 publishVersion=15.20.10 -buildCount=3 +buildCount=5 baseBetaVersion=15.20.11 diff --git a/contacts/src/main/java/cc/winboll/studio/contacts/views/DebugToolButtonsView.java b/contacts/src/main/java/cc/winboll/studio/contacts/views/DebugToolButtonsView.java index 527d738..30208fc 100644 --- a/contacts/src/main/java/cc/winboll/studio/contacts/views/DebugToolButtonsView.java +++ b/contacts/src/main/java/cc/winboll/studio/contacts/views/DebugToolButtonsView.java @@ -61,6 +61,7 @@ public class DebugToolButtonsView extends LinearLayout { Button btnShowLog = (Button) findViewById(R.id.btn_debug_show_log); Button btnRestartService = (Button) findViewById(R.id.btn_debug_restart_service); Button btnAppInfo = (Button) findViewById(R.id.btn_debug_app_info); + Button btnLayoutPreview = (Button) findViewById(R.id.btn_debug_layout_preview); btnClearData.setOnClickListener(new OnClickListener() { @Override @@ -103,6 +104,13 @@ public class DebugToolButtonsView extends LinearLayout { onShowAppInfo(); } }); + + btnLayoutPreview.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + onOpenLayoutPreview(); + } + }); } private void onClearData() { @@ -198,4 +206,18 @@ public class DebugToolButtonsView extends LinearLayout { ToastUtils.show("获取信息失败: " + e.getMessage()); } } + + private void onOpenLayoutPreview() { + LogUtils.d(TAG, "onOpenLayoutPreview: 打开布局草稿预览窗口"); + try { + Intent intent = new Intent(); + intent.setClassName(mContext, "cc.winboll.studio.contacts.unittest.LayoutDraftPreViewActivity"); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + mContext.startActivity(intent); + LogUtils.d(TAG, "onOpenLayoutPreview: 跳转成功"); + } catch (Exception e) { + LogUtils.e(TAG, "onOpenLayoutPreview: 跳转失败", e); + ToastUtils.show("跳转失败: " + e.getMessage()); + } + } } diff --git a/contacts/src/main/res/layout/view_debug_tool_buttons.xml b/contacts/src/main/res/layout/view_debug_tool_buttons.xml index 3120627..0eff66c 100644 --- a/contacts/src/main/res/layout/view_debug_tool_buttons.xml +++ b/contacts/src/main/res/layout/view_debug_tool_buttons.xml @@ -82,4 +82,20 @@ + + +