diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 45a6302ce6af2d6ede1ba7b3dca3b27c4313a192..9cd4f5e444571009c86f7a2f2445b3eb07ad3b42 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -25,18 +25,22 @@ export default class EntryAbility extends UIAbility { private curBp: string = ''; private updateBreakpoint(windowWidth: number): void { - let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; - let newBp: string = ''; - if (windowWidthVp < 600) { - newBp = 'sm'; - } else if (windowWidthVp < 840) { - newBp = 'md'; - } else { - newBp = 'lg'; - } - if (this.curBp !== newBp) { - this.curBp = newBp; - AppStorage.setOrCreate('currentBreakpoint', this.curBp); + try { + let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; + let newBp: string = ''; + if (windowWidthVp < 600) { + newBp = 'sm'; + } else if (windowWidthVp < 840) { + newBp = 'md'; + } else { + newBp = 'lg'; + } + if (this.curBp !== newBp) { + this.curBp = newBp; + AppStorage.setOrCreate('currentBreakpoint', this.curBp); + } + } catch (error) { + hilog.error(0x0000, 'EntryAbility', 'updateBreakpoint catch err:', JSON.stringify(error) ?? ''); } } diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index de78b5cae3b2ba99788048311e5d0cd34d075039..b2b33b8607d3688403661c437df3b87ee32d03ab 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -21,7 +21,7 @@ "label": "$string:EntryAbility_label", "startWindowIcon": "$media:startIcon", "startWindowBackground": "$color:start_window_background", - "exported": true, + "exported": false, "skills": [ { "entities": [ diff --git a/entry/src/main/resources/base/element/color.json b/entry/src/main/resources/base/element/color.json index c211691e49ede05a1d271918bb4fc9093dc765a5..0741552588f758da0a8c8cbf4405817087ed5765 100644 --- a/entry/src/main/resources/base/element/color.json +++ b/entry/src/main/resources/base/element/color.json @@ -4,38 +4,6 @@ "name": "start_window_background", "value": "#FFFFFF" }, - { - "name": "Play_backgroundColor", - "value": "#F9F9F9" - }, - { - "name": "Toggle_fontColor", - "value": "#182431" - }, - { - "name": "Toggle_selectedColor", - "value": "#317aff" - }, - { - "name": "Callback_message_backgroundColor", - "value": "#FFFFFF" - }, - { - "name": "XComponent_backgroundColor", - "value": "#000000" - }, - { - "name": "Text_color", - "value": "#686868" - }, - { - "name": "Message_color", - "value": "#737373" - }, - { - "name": "XComponent_text_color", - "value": "#686868" - }, { "name": "video_background_dark", "value": "#1a1a1a" diff --git a/entry/src/main/resources/base/element/float.json b/entry/src/main/resources/base/element/float.json deleted file mode 100644 index e72ba25d2877163c71a4321c53201979147a4039..0000000000000000000000000000000000000000 --- a/entry/src/main/resources/base/element/float.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "float": [ - { - "name": "toggle_padding", - "value": "10.75" - } - ] -} \ No newline at end of file diff --git a/entry/src/main/resources/base/element/integer.json b/entry/src/main/resources/base/element/integer.json index dbbc12173e666abc37b411cad892ee42c6bf34c1..a07a64191b7fcb8db61c0b8f49618d9fd75f5012 100644 --- a/entry/src/main/resources/base/element/integer.json +++ b/entry/src/main/resources/base/element/integer.json @@ -1,53 +1,9 @@ { "integer": [ - { - "name": "Navigation_padding", - "value": 5 - }, - { - "name": "x_component_marg_bottom", - "value": 30 - }, - { - "name": "other_padding", - "value": 14 - }, { "name": "auto_pip_height", "value": 56 }, - { - "name": "auto_text_width", - "value": 160 - }, - { - "name": "video1_button_height", - "value": 200 - }, - { - "name": "video1_text_padding", - "value": 310 - }, - { - "name": "video_text_padding", - "value": 120 - }, - { - "name": "control_height", - "value": 79 - }, - { - "name": "callback_text_padding", - "value": 273 - }, - { - "name": "text_height", - "value": 60 - }, - { - "name": "control_button_width", - "value": 149 - }, { "name": "auto_button_height", "value": 20 @@ -55,30 +11,6 @@ { "name": "auto_button_width", "value": 36 - }, - { - "name": "video_button_height", - "value": 150 - }, - { - "name": "video_button_board_radius", - "value": 10 - }, - { - "name": "auto_button_board_radius", - "value": 15 - }, - { - "name": "x_component_marg_top", - "value": 15 - }, - { - "name": "text_size", - "value": 15 - }, - { - "name": "scroll_height", - "value": 30 } ] } \ No newline at end of file diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index 7cb600d0bcb699ef9185baa412255560e1eac303..272977c561fbec97d0b0270cae813a97f34e9e2b 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -76,14 +76,6 @@ "name": "pip_effect", "value": "PiP Effect" }, - { - "name": "start", - "value": "Start" - }, - { - "name": "stop", - "value": "Stop" - }, { "name": "auto", "value": "Automatically Start PiP" @@ -104,10 +96,6 @@ "name": "callback_message", "value": "Callback Message" }, - { - "name": "current_video_pip_play", - "value": "Current Video Pip Play" - }, { "name": "current_error_hint", "value": "Without" diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json index 7cb600d0bcb699ef9185baa412255560e1eac303..272977c561fbec97d0b0270cae813a97f34e9e2b 100644 --- a/entry/src/main/resources/en_US/element/string.json +++ b/entry/src/main/resources/en_US/element/string.json @@ -76,14 +76,6 @@ "name": "pip_effect", "value": "PiP Effect" }, - { - "name": "start", - "value": "Start" - }, - { - "name": "stop", - "value": "Stop" - }, { "name": "auto", "value": "Automatically Start PiP" @@ -104,10 +96,6 @@ "name": "callback_message", "value": "Callback Message" }, - { - "name": "current_video_pip_play", - "value": "Current Video Pip Play" - }, { "name": "current_error_hint", "value": "Without" diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json index cf0a6343b5fce019684da8e4b1ae30d94bee0f3e..a06655a089fa5e4a46347466478ca8349dda3c31 100644 --- a/entry/src/main/resources/zh_CN/element/string.json +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -76,14 +76,6 @@ "name": "pip_effect", "value": "实现画中画效果" }, - { - "name": "start", - "value": "开启" - }, - { - "name": "stop", - "value": "关闭" - }, { "name": "auto", "value": "自动启动画中画" @@ -104,10 +96,6 @@ "name": "callback_message", "value": "回调信息" }, - { - "name": "current_video_pip_play", - "value": "当前视频正在画中画播放" - }, { "name": "current_error_hint", "value": "无"