From 7bf162075d82e1024e928d7bec59b924813fefb8 Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Thu, 12 Jun 2025 15:26:27 +0800
Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9name?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
liveviewlockscreensample/src/main/module.json5 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/liveviewlockscreensample/src/main/module.json5 b/liveviewlockscreensample/src/main/module.json5
index 839ebcd..bdbad8f 100644
--- a/liveviewlockscreensample/src/main/module.json5
+++ b/liveviewlockscreensample/src/main/module.json5
@@ -14,7 +14,7 @@
"pages": "$profile:main_pages",
"abilities": [
{
- "name": "Liveviewlockscreenability",
+ "name": "Liveviewlockscreensampleability",
"srcEntry": "./ets/entryability/EntryAbility.ets",
"description": "$string:EntryAbility_desc",
"icon": "$media:layered_image",
--
Gitee
From 602b703af14a41cde92fa26a90e4ba713ba12b89 Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Thu, 12 Jun 2025 15:33:39 +0800
Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9name?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
liveviewlockscreensample/src/main/module.json5 | 2 +-
.../src/main/resources/rawfile/traffic_light.svg | 12 ------------
.../rawfile/turn_right_dark_rectangle.png | Bin 995 -> 0 bytes
.../rawfile/turn_right_light_rectangle.png | Bin 879 -> 0 bytes
.../resources/rawfile/turn_right_light_square.png | Bin 953 -> 0 bytes
.../rawfile/turn_straight_dark_rectangle.png | Bin 858 -> 0 bytes
.../rawfile/turn_straight_light_rectangle.png | Bin 734 -> 0 bytes
7 files changed, 1 insertion(+), 13 deletions(-)
delete mode 100644 liveviewlockscreensample/src/main/resources/rawfile/traffic_light.svg
delete mode 100644 liveviewlockscreensample/src/main/resources/rawfile/turn_right_dark_rectangle.png
delete mode 100644 liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_rectangle.png
delete mode 100644 liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_square.png
delete mode 100644 liveviewlockscreensample/src/main/resources/rawfile/turn_straight_dark_rectangle.png
delete mode 100644 liveviewlockscreensample/src/main/resources/rawfile/turn_straight_light_rectangle.png
diff --git a/liveviewlockscreensample/src/main/module.json5 b/liveviewlockscreensample/src/main/module.json5
index bdbad8f..5b5e926 100644
--- a/liveviewlockscreensample/src/main/module.json5
+++ b/liveviewlockscreensample/src/main/module.json5
@@ -17,7 +17,7 @@
"name": "Liveviewlockscreensampleability",
"srcEntry": "./ets/entryability/EntryAbility.ets",
"description": "$string:EntryAbility_desc",
- "icon": "$media:layered_image",
+ "icon": "$media:startIcon",
"label": "$string:EntryAbility_label",
"startWindowIcon": "$media:startIcon",
"startWindowBackground": "$color:start_window_background",
diff --git a/liveviewlockscreensample/src/main/resources/rawfile/traffic_light.svg b/liveviewlockscreensample/src/main/resources/rawfile/traffic_light.svg
deleted file mode 100644
index 683a432..0000000
--- a/liveviewlockscreensample/src/main/resources/rawfile/traffic_light.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_dark_rectangle.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_right_dark_rectangle.png
deleted file mode 100644
index 41f78ea0b59d840cfe841594f054b33257e33933..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 995
zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#X#z`#7q)5S5Q
zV$R#U{@!;SWZFNjuiwBLtHI&gD))Nrh425hs=jGyR7_eI$8}V0)4`C>>37eh)NQ{1
zoLOm$x73{Uw8ttrstnD2X7Q^psZToX_)?f7NA=~ev-9tIM2TBW&*4}QfB!-GTVIa$
zrTz*l^o8r|*V?Ew$QEx&)hn4W5{5X5liU*b)(=DuQ?681Cy>i8$U
zo07=9LR6I@?SFOm9nl^EhRy%$Z>HCVw=jIj`l#Nl#IoVYr~PO7zdEe%Z<*V(*Pz)I
zDEX41NcVrXDSzmlvlhpKW(T?2=Pvp3_JNH3lj^h5Kh`OG+6&9RUYoRe-|8=R4zF(R
z58HKc`mBSM9u<4SeluiTJUIQ-e%2*r^B>OW_o^1xJKZe1TTAvpB#AuPb}X26^r6{)|ryzDubdX}u@GBw?QZt$ps-SYW(ezbRjLtz6Jyf9!Yl
zRWpD>6Wl^K@9SpxRh#lH-2C-!j)d~7=YFlb6n!wzH}`+r%~Nx`MHj^HPQJdKRVGWj
zT#rejZ1pochu`(=Hme?e|E0)cp!e%<>&+c(2JQ^cI1b1#&QNA3W=ZH{I3w6#$uyJ%
b|1oaPY1(!5+yVz+u4V9a^>bP0l+XkKzF({Y
diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_rectangle.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_rectangle.png
deleted file mode 100644
index 52dff1c8ba8c9e3c48c150d2939ca376e1832ae9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 879
zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#X#z`(5L>Eakt
zG3V{=gSodIL|iXUKfrq9x6USS?whGGj!~Uj2EmP2yR;`<3bgVNo0M=!O}A6(Q~kN!
z>=GP}$=wq7Bu@$HGD?)z%c%aa5Ln>x>wDUi1CI|jb={j^<7Dt@O+T|j)3LeMKbL=8
zb2yvD6@|Ri9%T&^3ALt^mAo$No#TEwFkLt}FO+X<|
z$+o9+-RC}1x4XQd3nC9oT|Z8qQyH?CC#70@$BPena>qh#({I}G
z)pgl5Jds<>pWx^E@pksJz-4}KqTYzupNw>$X}9)u0FWi={^Ku`_f5^ZO`Cg*PPeS{
z4E&RlF4ev6*Y2hBIK(6WoLj)dXruc<<~R4h^K;|!Ie#17p2&0C>zD4!_lM3)ugjR1
zTeAG{?UR!IXTL?+FIn-grA)Mc{jvFNOLtsLzq<0@sr9*i(T8*Gu39e-{`YoEh~2S}
z)pox&H^__DUyIxMe(n8N9~}KwiC0P1aj$rK-p79Xu~gN!@^von8E#IM-e0f%($Uj@
z-<4~82JO*d^|wOrALlbz=ksUZm(~0FWfLMUZn?U@3nUnDd{tPjy!C+%*8`k2Vf3j@O1TaS?83{
F1OQd4dg}lH
diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_square.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_square.png
deleted file mode 100644
index 7941168e4f843aa2c850ba818d74fb63edee8a5d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 953
zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#X#z`$JK>Eakt
zG3V{wv$?k&1lk_nJ-~Y7yG)Tc_s*H?6xONl(rL2FBHI>Py#NZ<;wXGCdy1XqD`l^Cz_J!`iP*O}}hEe*HU3
z=|E@a-S}Syn~z_6-MabTk+{X#d($j7J)Zi1t6kK3>At)fOg_z~I}5o44$it`$jXt(
z`)&@C%LX>S;0A$dXO_L^(z9ZE$8s)PUbp2=730O3GefPuc%S6Em9G?alp6k7*4?j??G5Qw_;dO|
z-SyS;{!FpUmkX`jDN)75(f3Ew-|~6=Ja!&yMvI@#cjWsg2scc&*L(h^>f9k#g}Q^~
zoY$8(1~3+UT3+ejka3-%=kMpZJ^T`C4Ug*V+Cq2A3#c_5d1t@;*4YIDj2nKt=U)D}
z=zYLzX`3rnAEw^;8-Ml_ztdTDhTZ?WU+vx}lFIZT<6AkKD@Q`#$NC))-rFoWzrCe)
z{kBPox2Ig%{k`_zhdK9)<8O(-m+0EIEqLzv#XB9Q$~`eZ{$?xX$f4}nR?*8N`_786=);PEL-l_GfmwI!TkT%^&W&D^$#kXQ{5$^Luf2U51k2z2`>=c85f+Jr
z?fZ>01wqUY8&|}}Co%EtPW!H(cYXQ{hV9XB*69l#*zoqs_2P50Gt5i#4hA1+nDhBq
zpS{$J^9QEiwV!uYh_UB|@{OhE|63<)|59k*!f@_||Br)z4*}Q$iB}&VQu1
diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_straight_dark_rectangle.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_straight_dark_rectangle.png
deleted file mode 100644
index 076ad2ccb161331ccc25eb95c76af10068839500..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 858
zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#X#z`!i%>Eakt
zG3V_a|7_tvk+zT9`?OOR1iWxsaXRk~N8SH^g&lp;jsY(&+0S-b*}W{nY1v-Sv}f~*
z=Y8KEIGZQ#)#U2uGbR}q_D(uC|Ig3r^{rn@u2nP2@=UVxv-#$F>26o{%XgvgSxXGQ
z_W!?>ta_1YM^?qT9Y3^~B&+ljTo*6-&U=3MgfH%w-flYG*|>?BXVNK6PmGxzvaaOmsP_w1|QGZgofw%@T{5^UKpZQ}aSn~N8`
z61-sbX{%PXNXQ*VKG~m9Q)PIy*)}}+5te7NM(n^w<@nV_ixZdXzP$oezVdgYm-T^J
z@1IPSWENQQB-(B4J!JPJiz?lV^X4}ZV%(0bb{hMDL7YA)<=
zI>E?us{Gx1;a|LqPcYu#iu)dSz{l)%{Q0ea)@^)tf9sAH^972QKHq;*+H-&Zj&~B~
zxBeR%>F+f+ERE$zJil!1{wj-Q_ukdiD!-h)%zaJ#tp9AERxkN&8^3@0mtcP7`$x|u
zn@_6qi4k}DBKzQ?!ppPYzWf
z?gykds_1^oPrJ!cb${EJJx`-ozs|n%+w6mCHG_4=P39kd=S#zWy#4<{Tj|~=_CoLX
z#tnR7stwD(KhEEH{ZRC+-`jhi=UP6ySGwg3yViZrKg_{*_RY*ay0e;n!|{%OwZbIB3KYwhyB?M?PI_F{-mVKJDa#ou`A1j7R!hI7M{
bcxTVGsh~Qv#di)c!7_Nd`njxgN@xNAwC_a|
--
Gitee
From 19ee24aae6749286fae58f16c6c4f65fa346b4cd Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Thu, 12 Jun 2025 15:35:37 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9name?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
liveviewlockscreensample/src/main/module.json5 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/liveviewlockscreensample/src/main/module.json5 b/liveviewlockscreensample/src/main/module.json5
index 5b5e926..ff9557d 100644
--- a/liveviewlockscreensample/src/main/module.json5
+++ b/liveviewlockscreensample/src/main/module.json5
@@ -14,7 +14,7 @@
"pages": "$profile:main_pages",
"abilities": [
{
- "name": "Liveviewlockscreensampleability",
+ "name": "LiveviewlockscreensampleAbility",
"srcEntry": "./ets/entryability/EntryAbility.ets",
"description": "$string:EntryAbility_desc",
"icon": "$media:startIcon",
--
Gitee
From 0571867b27e46dc3214463cac6579b4b63d5d09b Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Thu, 12 Jun 2025 16:20:56 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E5=8F=B0?=
=?UTF-8?q?=E8=BF=90=E8=A1=8C=E7=90=86=E7=94=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/base/element/string.json | 2 +-
.../src/main/resources/zh_CN/element/string.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/liveviewlockscreenlibrary/src/main/resources/base/element/string.json b/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
index dda5791..557ef91 100644
--- a/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
+++ b/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
@@ -14,7 +14,7 @@
},
{
"name": "reason_background",
- "value": "Background operation to update the live view"
+ "value": "后台更新实况窗数据"
},
{
"name": "traffic_info_meter",
diff --git a/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json b/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
index dda5791..557ef91 100644
--- a/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
+++ b/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
@@ -14,7 +14,7 @@
},
{
"name": "reason_background",
- "value": "Background operation to update the live view"
+ "value": "后台更新实况窗数据"
},
{
"name": "traffic_info_meter",
--
Gitee
From 53c7179d5c95222a47776b9d0934cbcc080bf463 Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Thu, 12 Jun 2025 16:50:21 +0800
Subject: [PATCH 5/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87?=
=?UTF-8?q?=E8=B5=84=E6=BA=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../rawfile/turn_right_dark_rectangle.png | Bin 0 -> 995 bytes
.../rawfile/turn_right_light_rectangle.png | Bin 0 -> 879 bytes
.../resources/rawfile/turn_right_light_square.png | Bin 0 -> 953 bytes
.../rawfile/turn_straight_dark_rectangle.png | Bin 0 -> 858 bytes
.../rawfile/turn_straight_light_rectangle.png | Bin 0 -> 734 bytes
5 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_dark_rectangle.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_dark_rectangle.png
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..41f78ea0b59d840cfe841594f054b33257e33933 100644
GIT binary patch
literal 995
zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#X#z`#7q)5S5Q
zV$R#U{@!;SWZFNjuiwBLtHI&gD))Nrh425hs=jGyR7_eI$8}V0)4`C>>37eh)NQ{1
zoLOm$x73{Uw8ttrstnD2X7Q^psZToX_)?f7NA=~ev-9tIM2TBW&*4}QfB!-GTVIa$
zrTz*l^o8r|*V?Ew$QEx&)hn4W5{5X5liU*b)(=DuQ?681Cy>i8$U
zo07=9LR6I@?SFOm9nl^EhRy%$Z>HCVw=jIj`l#Nl#IoVYr~PO7zdEe%Z<*V(*Pz)I
zDEX41NcVrXDSzmlvlhpKW(T?2=Pvp3_JNH3lj^h5Kh`OG+6&9RUYoRe-|8=R4zF(R
z58HKc`mBSM9u<4SeluiTJUIQ-e%2*r^B>OW_o^1xJKZe1TTAvpB#AuPb}X26^r6{)|ryzDubdX}u@GBw?QZt$ps-SYW(ezbRjLtz6Jyf9!Yl
zRWpD>6Wl^K@9SpxRh#lH-2C-!j)d~7=YFlb6n!wzH}`+r%~Nx`MHj^HPQJdKRVGWj
zT#rejZ1pochu`(=Hme?e|E0)cp!e%<>&+c(2JQ^cI1b1#&QNA3W=ZH{I3w6#$uyJ%
b|1oaPY1(!5+yVz+u4V9a^>bP0l+XkKzF({Y
literal 0
HcmV?d00001
diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_rectangle.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_rectangle.png
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..52dff1c8ba8c9e3c48c150d2939ca376e1832ae9 100644
GIT binary patch
literal 879
zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#X#z`(5L>Eakt
zG3V{=gSodIL|iXUKfrq9x6USS?whGGj!~Uj2EmP2yR;`<3bgVNo0M=!O}A6(Q~kN!
z>=GP}$=wq7Bu@$HGD?)z%c%aa5Ln>x>wDUi1CI|jb={j^<7Dt@O+T|j)3LeMKbL=8
zb2yvD6@|Ri9%T&^3ALt^mAo$No#TEwFkLt}FO+X<|
z$+o9+-RC}1x4XQd3nC9oT|Z8qQyH?CC#70@$BPena>qh#({I}G
z)pgl5Jds<>pWx^E@pksJz-4}KqTYzupNw>$X}9)u0FWi={^Ku`_f5^ZO`Cg*PPeS{
z4E&RlF4ev6*Y2hBIK(6WoLj)dXruc<<~R4h^K;|!Ie#17p2&0C>zD4!_lM3)ugjR1
zTeAG{?UR!IXTL?+FIn-grA)Mc{jvFNOLtsLzq<0@sr9*i(T8*Gu39e-{`YoEh~2S}
z)pox&H^__DUyIxMe(n8N9~}KwiC0P1aj$rK-p79Xu~gN!@^von8E#IM-e0f%($Uj@
z-<4~82JO*d^|wOrALlbz=ksUZm(~0FWfLMUZn?U@3nUnDd{tPjy!C+%*8`k2Vf3j@O1TaS?83{
F1OQd4dg}lH
literal 0
HcmV?d00001
diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_square.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_square.png
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7941168e4f843aa2c850ba818d74fb63edee8a5d 100644
GIT binary patch
literal 953
zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#X#z`$JK>Eakt
zG3V{wv$?k&1lk_nJ-~Y7yG)Tc_s*H?6xONl(rL2FBHI>Py#NZ<;wXGCdy1XqD`l^Cz_J!`iP*O}}hEe*HU3
z=|E@a-S}Syn~z_6-MabTk+{X#d($j7J)Zi1t6kK3>At)fOg_z~I}5o44$it`$jXt(
z`)&@C%LX>S;0A$dXO_L^(z9ZE$8s)PUbp2=730O3GefPuc%S6Em9G?alp6k7*4?j??G5Qw_;dO|
z-SyS;{!FpUmkX`jDN)75(f3Ew-|~6=Ja!&yMvI@#cjWsg2scc&*L(h^>f9k#g}Q^~
zoY$8(1~3+UT3+ejka3-%=kMpZJ^T`C4Ug*V+Cq2A3#c_5d1t@;*4YIDj2nKt=U)D}
z=zYLzX`3rnAEw^;8-Ml_ztdTDhTZ?WU+vx}lFIZT<6AkKD@Q`#$NC))-rFoWzrCe)
z{kBPox2Ig%{k`_zhdK9)<8O(-m+0EIEqLzv#XB9Q$~`eZ{$?xX$f4}nR?*8N`_786=);PEL-l_GfmwI!TkT%^&W&D^$#kXQ{5$^Luf2U51k2z2`>=c85f+Jr
z?fZ>01wqUY8&|}}Co%EtPW!H(cYXQ{hV9XB*69l#*zoqs_2P50Gt5i#4hA1+nDhBq
zpS{$J^9QEiwV!uYh_UB|@{OhE|63<)|59k*!f@_||Br)z4*}Q$iB}&VQu1
literal 0
HcmV?d00001
diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_dark_rectangle.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_dark_rectangle.png
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..076ad2ccb161331ccc25eb95c76af10068839500 100644
GIT binary patch
literal 858
zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSEX7WqAsj$Z!;#X#z`!i%>Eakt
zG3V_a|7_tvk+zT9`?OOR1iWxsaXRk~N8SH^g&lp;jsY(&+0S-b*}W{nY1v-Sv}f~*
z=Y8KEIGZQ#)#U2uGbR}q_D(uC|Ig3r^{rn@u2nP2@=UVxv-#$F>26o{%XgvgSxXGQ
z_W!?>ta_1YM^?qT9Y3^~B&+ljTo*6-&U=3MgfH%w-flYG*|>?BXVNK6PmGxzvaaOmsP_w1|QGZgofw%@T{5^UKpZQ}aSn~N8`
z61-sbX{%PXNXQ*VKG~m9Q)PIy*)}}+5te7NM(n^w<@nV_ixZdXzP$oezVdgYm-T^J
z@1IPSWENQQB-(B4J!JPJiz?lV^X4}ZV%(0bb{hMDL7YA)<=
zI>E?us{Gx1;a|LqPcYu#iu)dSz{l)%{Q0ea)@^)tf9sAH^972QKHq;*+H-&Zj&~B~
zxBeR%>F+f+ERE$zJil!1{wj-Q_ukdiD!-h)%zaJ#tp9AERxkN&8^3@0mtcP7`$x|u
zn@_6qi4k}DBKzQ?!ppPYzWf
z?gykds_1^oPrJ!cb${EJJx`-ozs|n%+w6mCHG_4=P39kd=S#zWy#4<{Tj|~=_CoLX
z#tnR7stwD(KhEEH{ZRC+-`jhi=UP6ySGwg3yViZrKg_{*_RY*ay0e;n!|{%OwZbIB3KYwhyB?M?PI_F{-mVKJDa#ou`A1j7R!hI7M{
bcxTVGsh~Qv#di)c!7_Nd`njxgN@xNAwC_a|
literal 0
HcmV?d00001
--
Gitee
From 343b7190d68aa371fa9d3c00fb44b90ae3ace46e Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Fri, 13 Jun 2025 15:36:10 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E8=A7=84=E8=8C=83=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 29 ---------
.../main/ets/pages/LiveViewLockScreenPage.ets | 64 ++++++++++++++++---
.../src/main/ets/utils/BreakpointSystem.ets | 10 +--
.../src/main/ets/utils/LiveView.ets | 2 +-
.../main/ets/utils/LiveViewExtAbilityUtil.ets | 30 ++++++++-
.../src/main/ets/utils/LiveViewUtil.ets | 2 +-
.../src/main/ets/utils/WindowUtil.ets | 12 ++--
.../src/main/ets/view/TrafficView.ets | 9 +--
.../main/ets/liveview/LiveViewExtAbility.ets | 6 +-
9 files changed, 98 insertions(+), 66 deletions(-)
diff --git a/README.md b/README.md
index 6e0b5f7..1de2184 100644
--- a/README.md
+++ b/README.md
@@ -25,35 +25,6 @@
4. 本Sample仅提供在本地创建、更新与结束实况窗的能力(不能后台更新,若要后台更新,请使用Push Kit)。若要使用Push Kit更新,可参考[推送实况窗消息服务](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/push-update-liveview),用已有服务器调用对应的REST API。
-## 工程目录
-
-```
-├─entry/src/main/ets
-│ ├───constant
-│ │ └───Constant.ets // 常量
-│ ├───entryability
-│ │ └───EntryAbility.ets // EntryAbility
-│ ├───liveview
-│ │ ├───LiveViewExtAbility.ets // 实况窗
-│ │ └───LockScreenPage.ets // 锁屏页面
-│ ├───model
-│ │ └───RouteDataModel.ets // 导航数据Model
-│ ├───pages
-│ │ └───Index.ets // 主页面
-│ ├───utils
-│ │ ├───BreakpointUtil.ets // 断点工具类
-│ │ ├───LiveView.ets // 实况窗类
-│ │ └───LiveViewUtil.ets // 实况窗工具类
-│ ├───view
-│ │ ├───RoadView.ets // 道路
-│ │ ├───TrafficInfoView.ets // 导航信息
-│ │ └───TrafficView.ets // 导航页面
-│ └───viewmodel
-│ └───RouteDataViewModel.ets // 导航数据ViewModel
-└───entry/src/main/resources
-
-```
-
## 具体实现
1. HomePage主页面在创建后,创建实况窗和创建定时任务,每间隔固定时间调用liveViewManager.updateLiveView()接口更新实况窗,并通过commonEventManager.publish()接口传递新的参数给沉浸实况窗页面,实现实况窗和沉浸实况窗更新。
diff --git a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
index c803730..5655f65 100644
--- a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
@@ -13,20 +13,67 @@
* limitations under the License.
*/
-import { promptAction } from '@kit.ArkUI';
+import { hilog } from '@kit.PerformanceAnalysisKit';
import { LiveView } from '../utils/LiveView';
import { TrafficView } from '../view/TrafficView';
+const TAG = '[LiveViewLockScreenPage]';
+
@Component
export struct LiveViewLockScreenPage {
+ private customDialogController: CustomDialogController = new CustomDialogController({
+ builder: this.DialogBuilder(),
+ cancel: () => {
+ },
+ onWillDismiss: (dismissDialogAction: DismissDialogAction) => {
+ dismissDialogAction.dismiss()
+ },
+ alignment: DialogAlignment.Center,
+ autoCancel: true,
+ cornerRadius: 32
+ });
+
aboutToAppear(): void {
LiveView.getInstance().createLiveView();
- this.getUIContext().getPromptAction().showToast({
- message: $r('app.string.toast'),
- duration: 2000,
- showMode: promptAction.ToastShowMode.DEFAULT,
- bottom: 180
- });
+ this.customDialogController.open();
+ }
+
+ @Builder
+ DialogBuilder() {
+ Column() {
+ Row() {
+ Text('提示')
+ .fontSize(20)
+ .lineHeight(27)
+ .fontColor($r('sys.color.font_primary'))
+ }
+ .height(77)
+ .width('100%')
+ .justifyContent(FlexAlign.Center)
+ .alignItems(VerticalAlign.Center)
+
+ Text('碰一碰当前仅支持手机端操作体验')
+ .fontSize(16)
+ .lineHeight(21)
+ .fontColor($r('sys.color.font_primary'))
+
+ Row() {
+ Text('知道了')
+ .width('100%')
+ .onClick(() => {
+ hilog.info(0x0000, TAG, 'Button-clicking callback');
+ })
+ }
+ .height(56)
+ .width('100%')
+ .margin({ top: 8 })
+ .padding({ left: 16, right: 16 })
+ .alignItems(VerticalAlign.Top)
+ }
+ .width(328)
+ .height(141)
+ .borderRadius(32)
+ .backgroundColor($r('sys.color.ohos_id_blur_style_component_ultra_thick_color'))
}
build() {
@@ -34,9 +81,10 @@ export struct LiveViewLockScreenPage {
Image($r('app.media.traffic_background'))
.width('110%')
.height('110%')
+
TrafficView()
}
.width('100%')
.height('100%')
}
-}
\ No newline at end of file
+}
diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/BreakpointSystem.ets b/liveviewlockscreenlibrary/src/main/ets/utils/BreakpointSystem.ets
index 67c4df7..8ca8daa 100644
--- a/liveviewlockscreenlibrary/src/main/ets/utils/BreakpointSystem.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/utils/BreakpointSystem.ets
@@ -83,18 +83,14 @@ export class BreakpointSystem {
}
public updateCurrentWidthBreakpoint(widthBreakpoint: BreakpointTypeEnum): void {
- hilog.info(0x0000, TAG, '%{public}s', `widthBreakpoint 1: ${widthBreakpoint}`);
if (this.currentWidthBreakpoint !== widthBreakpoint) {
- hilog.info(0x0000, TAG, '%{public}s', `widthBreakpoint 2: ${widthBreakpoint}`);
this.currentWidthBreakpoint = widthBreakpoint;
AppStorage.setOrCreate('currentWidthBreakpoint', this.currentWidthBreakpoint);
}
}
public updateCurrentHeightBreakpoint(heightBreakpoint: BreakpointTypeEnum): void {
- hilog.info(0x0000, TAG, '%{public}s', `heightBreakpoint 1: ${heightBreakpoint}`);
if (this.currentHeightBreakpoint !== heightBreakpoint) {
- hilog.info(0x0000, TAG, '%{public}s', `heightBreakpoint 2: ${heightBreakpoint}`);
this.currentHeightBreakpoint = heightBreakpoint;
AppStorage.setOrCreate('currentHeightBreakpoint', this.currentHeightBreakpoint);
}
@@ -126,7 +122,6 @@ export class BreakpointSystem {
} else {
widthBp = BreakpointTypeEnum.XL;
}
- hilog.info(0x0000, TAG, '%{public}s', `widthBp: ${widthBp}`);
this.updateCurrentWidthBreakpoint(widthBp);
if (windowRatio < 0.8) {
@@ -136,11 +131,10 @@ export class BreakpointSystem {
} else {
heightBp = BreakpointTypeEnum.MD;
}
- hilog.info(0x0000, TAG, '%{public}s', `heightBp: ${heightBp}`);
this.updateCurrentHeightBreakpoint(heightBp)
} catch (error) {
- const err: BusinessError = error as BusinessError;
- hilog.error(0x0000, TAG, `UpdateBreakpoint fail, error code: ${err.code}, message: ${err.message}`);
+ hilog.error(0x0000, TAG, '%{public}s',
+ `UpdateBreakpoint fail. code is ${(error as BusinessError).code} message is ${(error as BusinessError).message}`);
}
}
}
\ No newline at end of file
diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/LiveView.ets b/liveviewlockscreenlibrary/src/main/ets/utils/LiveView.ets
index c8df1b6..71759a2 100644
--- a/liveviewlockscreenlibrary/src/main/ets/utils/LiveView.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/utils/LiveView.ets
@@ -133,7 +133,7 @@ export class LiveView {
wants: [
{
bundleName: AppStorage.get('bundleName'),
- abilityName: 'EntryAbility'
+ abilityName: 'LiveviewlockscreensampleAbility'
}
],
actionType: wantAgent.OperationType.START_ABILITY,
diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewExtAbilityUtil.ets b/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewExtAbilityUtil.ets
index 0c677d0..8422aa2 100644
--- a/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewExtAbilityUtil.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewExtAbilityUtil.ets
@@ -24,7 +24,25 @@ import { LaneData } from '../model/RouteDataModel';
const TAG: string = '[LiveViewExtAbilityUtil]';
export class LiveViewExtAbilityUtil {
- public static setSession(session: UIExtensionContentSession): void {
+ // Singleton pattern implementation
+ private static instance: LiveViewExtAbilityUtil;
+ private subscriber: commonEventManager.CommonEventSubscriber | null;
+
+ // Private constructor for singleton pattern
+ private constructor() {
+ this.subscriber = null;
+ }
+
+ // Singleton accessor method
+ public static getInstance(): LiveViewExtAbilityUtil {
+ // Lazy initialization of the singleton instance
+ if (!LiveViewExtAbilityUtil.instance) {
+ LiveViewExtAbilityUtil.instance = new LiveViewExtAbilityUtil();
+ }
+ return LiveViewExtAbilityUtil.instance;
+ }
+
+ public setSession(session: UIExtensionContentSession): void {
let param: Record = {
'session': session
};
@@ -63,10 +81,10 @@ export class LiveViewExtAbilityUtil {
`Failed to create subscriber. code is ${error.code} message is ${error.message}.`);
return;
}
-
+ this.subscriber = data;
hilog.info(0x0000, TAG, '%{public}s', 'Succeeded in creating subscriber.');
// Event handling logic.
- commonEventManager.subscribe(data,
+ commonEventManager.subscribe(this.subscriber,
async (error: BusinessError, data: commonEventManager.CommonEventData) => {
if (error) {
hilog.error(0x0000, TAG, '%{public}s',
@@ -107,4 +125,10 @@ export class LiveViewExtAbilityUtil {
;
}
}
+
+ public destroySubscribe(): void {
+ commonEventManager.unsubscribe(this.subscriber, () => {
+ this.subscriber = null;
+ });
+ }
}
\ No newline at end of file
diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewUtil.ets b/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewUtil.ets
index 8efaf9d..a76b662 100644
--- a/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewUtil.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewUtil.ets
@@ -156,7 +156,7 @@ export class LiveViewUtil {
const wantAgentInfo: wantAgent.WantAgentInfo = {
wants: [{
bundleName: AppStorage.get('bundleName'),
- abilityName: 'EntryAbility'
+ abilityName: 'LiveviewlockscreensampleAbility'
} as Want],
actionType: wantAgent.OperationType.START_ABILITIES,
requestCode: 0,
diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/WindowUtil.ets b/liveviewlockscreenlibrary/src/main/ets/utils/WindowUtil.ets
index 1d55016..dd1a7c9 100644
--- a/liveviewlockscreenlibrary/src/main/ets/utils/WindowUtil.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/utils/WindowUtil.ets
@@ -22,8 +22,10 @@ const TAG: string = '[WindowUtil]';
export class WindowUtil {
public static requestFullScreen(windowStage: window.WindowStage): void {
- windowStage.getMainWindow((err: BusinessError, data: window.Window) => {
- if (err.code) {
+ windowStage.getMainWindow((error: BusinessError, data: window.Window) => {
+ if (error.code) {
+ hilog.error(0x0000, TAG, '%{public}s',
+ `Failed to getMainWindow. Cause code: ${error.code}, message: ${error.message}`);
return;
}
const windowObj: window.Window = data;
@@ -51,9 +53,9 @@ export class WindowUtil {
}
public static registerBreakPoint(windowStage: window.WindowStage) {
- windowStage.getMainWindow((err: BusinessError, data: window.Window) => {
- if (err.code) {
- hilog.error(0x0000, TAG, `Failed to get main window: ${err.message}`);
+ windowStage.getMainWindow((error: BusinessError, data: window.Window) => {
+ if (error.code) {
+ hilog.error(0x0000, TAG, `Failed to get main window. Cause code: ${error.code}, message: ${error.message}`);
return;
}
BreakpointSystem.getInstance().updateWidthHeightBp(data);
diff --git a/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets b/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets
index 4ec89ce..3c4ad27 100644
--- a/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets
@@ -21,16 +21,11 @@ import { hilog } from '@kit.PerformanceAnalysisKit';
@Component
export struct TrafficView {
@StorageProp('bottomRectHeight') bottomRectHeight: number = 0;
- @Watch('test') @StorageLink('currentWidthBreakpoint') currentWidthBreakpoint: string = BreakpointTypeEnum.SM;
- @Watch('test') @StorageLink('currentHeightBreakpoint') currentHeightBreakpoint: string = BreakpointTypeEnum.LG;
+ @StorageLink('currentWidthBreakpoint') currentWidthBreakpoint: string = BreakpointTypeEnum.SM;
+ @StorageLink('currentHeightBreakpoint') currentHeightBreakpoint: string = BreakpointTypeEnum.LG;
@State roadInfo: LaneData | undefined = undefined;
@State isShowButton: boolean = false;
- test(changedPropertyName: string) {
- hilog.info(0x0000, '[test]', '%{public}s', `widthBp: ${this.currentWidthBreakpoint}`);
- hilog.info(0x0000, '[test]', '%{public}s', `heightBp: ${this.currentHeightBreakpoint}`);
- }
-
build() {
if (this.currentWidthBreakpoint !== BreakpointTypeEnum.SM ||
this.currentHeightBreakpoint !== BreakpointTypeEnum.MD) {
diff --git a/liveviewlockscreensample/src/main/ets/liveview/LiveViewExtAbility.ets b/liveviewlockscreensample/src/main/ets/liveview/LiveViewExtAbility.ets
index 5baa435..34340af 100644
--- a/liveviewlockscreensample/src/main/ets/liveview/LiveViewExtAbility.ets
+++ b/liveviewlockscreensample/src/main/ets/liveview/LiveViewExtAbility.ets
@@ -45,14 +45,12 @@ export default class LiveViewExtAbility extends LiveViewLockScreenExtensionAbili
// Core logic when creating UI session.
onSessionCreate(_want: Want, session: UIExtensionContentSession): void {
hilog.info(0x0000, TAG, '%{public}s', 'LiveViewLockScreenExtAbility onSessionCreate begin.');
- LiveViewExtAbilityUtil.setSession(session);
+ LiveViewExtAbilityUtil.getInstance().setSession(session);
}
// Cleanup operations when destroying UI session
onSessionDestroy(): void {
- commonEventManager.unsubscribe(this.subscriber, () => {
- this.subscriber = null;
- });
+ LiveViewExtAbilityUtil.getInstance().destroySubscribe();
hilog.info(0x0000, TAG, '%{public}s', 'LiveViewLockScreenExtAbility onSessionDestroy begin.');
}
--
Gitee
From bbbde993a8151be60768507aa9d8a419c5419e80 Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Fri, 13 Jun 2025 16:22:35 +0800
Subject: [PATCH 7/9] =?UTF-8?q?=E8=A7=84=E8=8C=83=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/ets/pages/LiveViewLockScreenPage.ets | 74 ++++++++++++-------
.../src/main/ets/view/TrafficView.ets | 51 ++++++++++---
2 files changed, 87 insertions(+), 38 deletions(-)
diff --git a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
index 5655f65..3c1db47 100644
--- a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
@@ -19,49 +19,41 @@ import { TrafficView } from '../view/TrafficView';
const TAG = '[LiveViewLockScreenPage]';
-@Component
-export struct LiveViewLockScreenPage {
- private customDialogController: CustomDialogController = new CustomDialogController({
- builder: this.DialogBuilder(),
- cancel: () => {
- },
- onWillDismiss: (dismissDialogAction: DismissDialogAction) => {
- dismissDialogAction.dismiss()
- },
- alignment: DialogAlignment.Center,
- autoCancel: true,
- cornerRadius: 32
- });
-
- aboutToAppear(): void {
- LiveView.getInstance().createLiveView();
- this.customDialogController.open();
- }
+@CustomDialog
+struct TipDialog {
+ public controller?: CustomDialogController;
+ public onConfirm: () => void = () => {
+ };
- @Builder
- DialogBuilder() {
+ build() {
Column() {
Row() {
Text('提示')
.fontSize(20)
+ .fontWeight(FontWeight.Bold)
.lineHeight(27)
- .fontColor($r('sys.color.font_primary'))
+ .fontColor('#000000')
}
- .height(77)
+ .height(56)
.width('100%')
.justifyContent(FlexAlign.Center)
.alignItems(VerticalAlign.Center)
- Text('碰一碰当前仅支持手机端操作体验')
+ Text('需要锁屏沉浸实况窗权限才可完整体验')
.fontSize(16)
+ .fontWeight(FontWeight.Medium)
.lineHeight(21)
- .fontColor($r('sys.color.font_primary'))
+ .fontColor('#000000')
Row() {
Text('知道了')
.width('100%')
+ .height(40)
+ .fontColor('#0A57F7')
+ .textAlign(TextAlign.Center)
.onClick(() => {
hilog.info(0x0000, TAG, 'Button-clicking callback');
+ this.onConfirm();
})
}
.height(56)
@@ -69,11 +61,39 @@ export struct LiveViewLockScreenPage {
.margin({ top: 8 })
.padding({ left: 16, right: 16 })
.alignItems(VerticalAlign.Top)
+ .justifyContent(FlexAlign.Center)
}
- .width(328)
- .height(141)
+ .width('100%')
+ .height('100%')
+ .alignItems(HorizontalAlign.Center)
.borderRadius(32)
- .backgroundColor($r('sys.color.ohos_id_blur_style_component_ultra_thick_color'))
+ .backgroundColor('#ffffff')
+ }
+}
+
+@Component
+export struct LiveViewLockScreenPage {
+ private customDialogController: CustomDialogController = new CustomDialogController({
+ builder: TipDialog({
+ onConfirm: () => {
+ this.customDialogController?.close();
+ }
+ }),
+ cancel: () => {
+ },
+ onWillDismiss: (dismissDialogAction: DismissDialogAction) => {
+ dismissDialogAction.dismiss()
+ },
+ alignment: DialogAlignment.Center,
+ autoCancel: true,
+ cornerRadius: 32,
+ width: 328,
+ height: 141
+ });
+
+ aboutToAppear(): void {
+ LiveView.getInstance().createLiveView();
+ this.customDialogController?.open();
}
build() {
diff --git a/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets b/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets
index 3c4ad27..7b27441 100644
--- a/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets
@@ -13,18 +13,33 @@
* limitations under the License.
*/
-import { LaneData } from '../model/RouteDataModel';
import { BreakpointType, BreakpointTypeEnum } from '../utils/BreakpointSystem';
import { TrafficInfoView } from './TrafficInfoView';
-import { hilog } from '@kit.PerformanceAnalysisKit';
@Component
export struct TrafficView {
@StorageProp('bottomRectHeight') bottomRectHeight: number = 0;
@StorageLink('currentWidthBreakpoint') currentWidthBreakpoint: string = BreakpointTypeEnum.SM;
@StorageLink('currentHeightBreakpoint') currentHeightBreakpoint: string = BreakpointTypeEnum.LG;
- @State roadInfo: LaneData | undefined = undefined;
- @State isShowButton: boolean = false;
+ @Prop lane: number = 2;
+ private updateInterval: number | undefined;
+
+ aboutToAppear(): void {
+ this.updateInterval = setInterval(() => {
+ if (this.lane === 2) {
+ this.lane = 1;
+ } else {
+ this.lane = 2;
+ }
+ }, 2000)
+ }
+
+ aboutToDisappear(): void {
+ if (this.updateInterval !== undefined) {
+ clearInterval(this.updateInterval);
+ this.updateInterval = undefined;
+ }
+ }
build() {
if (this.currentWidthBreakpoint !== BreakpointTypeEnum.SM ||
@@ -145,8 +160,14 @@ export struct TrafficView {
Row() {
Stack({ alignContent: Alignment.Top }) {
- Image($r('app.media.traffic_right'))
- .width(new BreakpointType({ sm: '70%', md: '50%', lg: '30%', }).getValue(this.currentWidthBreakpoint))
+ if (this.lane === 2) {
+ Image($r('app.media.traffic_right'))
+ .width(new BreakpointType({ sm: '70%', md: '50%', lg: '30%', }).getValue(this.currentWidthBreakpoint))
+ } else {
+ Image($r('app.media.traffic_left'))
+ .width(new BreakpointType({ sm: '70%', md: '50%', lg: '30%', }).getValue(this.currentWidthBreakpoint))
+ }
+
Image($rawfile('traffic_light.svg'))
.objectFit(ImageFit.Contain)
.width(new BreakpointType({ sm: '20%', md: '15%', lg: '10%', }).getValue(this.currentWidthBreakpoint))
@@ -235,11 +256,19 @@ export struct TrafficView {
left: 16,
})
- Image($r('app.media.traffic_left'))
- .width('60%')
- .offset({
- y: 15,
- })
+ if (this.lane === 2) {
+ Image($r('app.media.traffic_right'))
+ .width('60%')
+ .offset({
+ y: 15,
+ })
+ } else {
+ Image($r('app.media.traffic_left'))
+ .width('60%')
+ .offset({
+ y: 15,
+ })
+ }
Column() {
Image($r('app.media.turn_right_light_rectangle'))
--
Gitee
From 20a147c0587aa41745fe17de8bd1ac20a3653d79 Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Fri, 13 Jun 2025 16:35:27 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=96=87=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/ets/pages/LiveViewLockScreenPage.ets | 14 +++++++-------
.../src/main/resources/base/element/color.json | 12 ++++++++++++
.../src/main/resources/base/element/string.json | 12 ++++++++++++
.../src/main/resources/en_US/element/string.json | 12 ++++++++++++
.../src/main/resources/zh_CN/element/string.json | 12 ++++++++++++
5 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
index 3c1db47..d5f63be 100644
--- a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
@@ -28,28 +28,28 @@ struct TipDialog {
build() {
Column() {
Row() {
- Text('提示')
+ Text($r('app.string.tip'))
.fontSize(20)
.fontWeight(FontWeight.Bold)
.lineHeight(27)
- .fontColor('#000000')
+ .fontColor($r('app.color.tip'))
}
.height(56)
.width('100%')
.justifyContent(FlexAlign.Center)
.alignItems(VerticalAlign.Center)
- Text('需要锁屏沉浸实况窗权限才可完整体验')
+ Text($r('app.string.tip_text'))
.fontSize(16)
.fontWeight(FontWeight.Medium)
.lineHeight(21)
- .fontColor('#000000')
+ .fontColor($r('app.color.tip'))
Row() {
- Text('知道了')
+ Text($r('app.string.tip_get'))
.width('100%')
.height(40)
- .fontColor('#0A57F7')
+ .fontColor($r('app.color.tip_text'))
.textAlign(TextAlign.Center)
.onClick(() => {
hilog.info(0x0000, TAG, 'Button-clicking callback');
@@ -67,7 +67,7 @@ struct TipDialog {
.height('100%')
.alignItems(HorizontalAlign.Center)
.borderRadius(32)
- .backgroundColor('#ffffff')
+ .backgroundColor($r('app.color.tip_background'))
}
}
diff --git a/liveviewlockscreenlibrary/src/main/resources/base/element/color.json b/liveviewlockscreenlibrary/src/main/resources/base/element/color.json
index 0784b8b..4ed1297 100644
--- a/liveviewlockscreenlibrary/src/main/resources/base/element/color.json
+++ b/liveviewlockscreenlibrary/src/main/resources/base/element/color.json
@@ -27,6 +27,18 @@
{
"name": "traffic_info_button",
"value": "#08000000"
+ },
+ {
+ "name": "tip",
+ "value": "#000000"
+ },
+ {
+ "name": "tip_background",
+ "value": "#ffffff"
+ },
+ {
+ "name": "tip_text",
+ "value": "#0A57F7"
}
]
}
\ No newline at end of file
diff --git a/liveviewlockscreenlibrary/src/main/resources/base/element/string.json b/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
index 557ef91..f7a4f35 100644
--- a/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
+++ b/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
@@ -83,6 +83,18 @@
{
"name": "Finish",
"value": "停止导航"
+ },
+ {
+ "name": "tip",
+ "value": "提示"
+ },
+ {
+ "name": "tip_text",
+ "value": "需要申请权限才可创建锁屏沉浸实况窗"
+ },
+ {
+ "name": "tip_get",
+ "value": "知道了"
}
]
}
\ No newline at end of file
diff --git a/liveviewlockscreenlibrary/src/main/resources/en_US/element/string.json b/liveviewlockscreenlibrary/src/main/resources/en_US/element/string.json
index 05391e0..6c50a7a 100644
--- a/liveviewlockscreenlibrary/src/main/resources/en_US/element/string.json
+++ b/liveviewlockscreenlibrary/src/main/resources/en_US/element/string.json
@@ -83,6 +83,18 @@
{
"name": "Finish",
"value": "Finish"
+ },
+ {
+ "name": "tip",
+ "value": "Tip"
+ },
+ {
+ "name": "tip_text",
+ "value": "Permission is required to experience the lock screen immersive live window"
+ },
+ {
+ "name": "tip_get",
+ "value": "I get"
}
]
}
\ No newline at end of file
diff --git a/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json b/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
index 557ef91..f7a4f35 100644
--- a/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
+++ b/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
@@ -83,6 +83,18 @@
{
"name": "Finish",
"value": "停止导航"
+ },
+ {
+ "name": "tip",
+ "value": "提示"
+ },
+ {
+ "name": "tip_text",
+ "value": "需要申请权限才可创建锁屏沉浸实况窗"
+ },
+ {
+ "name": "tip_get",
+ "value": "知道了"
}
]
}
\ No newline at end of file
--
Gitee
From 6836262facf389ef3cdb0cc4546f48a6b1e292a5 Mon Sep 17 00:00:00 2001
From: 26thE <962961353@qq.com>
Date: Fri, 13 Jun 2025 16:46:41 +0800
Subject: [PATCH 9/9] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=96=87=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/ets/pages/LiveViewLockScreenPage.ets | 2 +-
.../src/main/resources/base/element/string.json | 2 +-
.../src/main/resources/zh_CN/element/string.json | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
index d5f63be..511d614 100644
--- a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
+++ b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets
@@ -87,7 +87,7 @@ export struct LiveViewLockScreenPage {
alignment: DialogAlignment.Center,
autoCancel: true,
cornerRadius: 32,
- width: 328,
+ width: 338,
height: 141
});
diff --git a/liveviewlockscreenlibrary/src/main/resources/base/element/string.json b/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
index f7a4f35..056f708 100644
--- a/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
+++ b/liveviewlockscreenlibrary/src/main/resources/base/element/string.json
@@ -90,7 +90,7 @@
},
{
"name": "tip_text",
- "value": "需要申请权限才可创建锁屏沉浸实况窗"
+ "value": "申请锁屏沉浸实况窗权限可完整体验该功能"
},
{
"name": "tip_get",
diff --git a/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json b/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
index f7a4f35..056f708 100644
--- a/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
+++ b/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json
@@ -90,7 +90,7 @@
},
{
"name": "tip_text",
- "value": "需要申请权限才可创建锁屏沉浸实况窗"
+ "value": "申请锁屏沉浸实况窗权限可完整体验该功能"
},
{
"name": "tip_get",
--
Gitee