From bd29d906cbec2b1037cc6422dbb3ef77c9ef8969 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 25 Apr 2026 16:37:54 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3=E5=BC=A7=E5=BD=A2=E5=88=97?= =?utf8?q?=E8=A1=A8=EF=BC=8C=E8=9C=82=E7=AA=9D=EF=BC=8C=E7=9B=B4=E7=BA=BF?= =?utf8?q?=E5=88=97=E8=A1=A8=EF=BC=8C=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F?= =?utf8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/applist/src/ArcScaleListDesktopFragment.cpp | 6 +++++- .../nativeui/applist/src/HexagonsDesktopFragment.cpp | 1 + .../nativeapp/nativeui/applist/src/ListDesktopFragment.cpp | 1 + .../nativeui/applist/src/PlanetDesktopFragment.cpp | 1 + .../nativeapp/nativeui/themestyle/src/ThemeStyleCatalog.cpp | 3 --- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/ArcScaleListDesktopFragment.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/ArcScaleListDesktopFragment.cpp index 1282029e9..121b37e1a 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/ArcScaleListDesktopFragment.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/ArcScaleListDesktopFragment.cpp @@ -137,6 +137,7 @@ void ArcScaleListDesktopFragment::OnDestroyView() ClearAppItemToList(); if (ArcScaleList_ != nullptr) { + fragmentView_.Remove(ArcScaleList_); delete ArcScaleList_; ArcScaleList_ = nullptr; } @@ -153,7 +154,10 @@ void ArcScaleListDesktopFragment::OnDestroyView() bool ArcScaleListDesktopFragment::OnClick(UIView &view, const ClickEvent &event) { UNUSED(event); - AppItemView *itemView = dynamic_cast(&view); + ArcScaleListItemView *itemView = dynamic_cast(&view); + if (itemView == nullptr && view.GetParent() != nullptr) { + itemView = dynamic_cast(view.GetParent()); + } if (itemView == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "itemView is nullptr"); return false; diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/HexagonsDesktopFragment.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/HexagonsDesktopFragment.cpp index 51ada6642..67725ff96 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/HexagonsDesktopFragment.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/HexagonsDesktopFragment.cpp @@ -39,6 +39,7 @@ void HexagonsDesktopFragment::OnDestroyView() WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "HexagonsDesktopFragment::OnDestroyView"); ClearAppItemToList(); if (hexagonsList_ != nullptr) { + fragmentView_.Remove(hexagonsList_); delete hexagonsList_; hexagonsList_ = nullptr; } diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/ListDesktopFragment.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/ListDesktopFragment.cpp index 104b1fffc..538396b7f 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/ListDesktopFragment.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/ListDesktopFragment.cpp @@ -64,6 +64,7 @@ void ListDesktopFragment::OnDestroyView() listAdapter_ = nullptr; } if (contentList_ != nullptr) { + fragmentView_.Remove(contentList_); delete contentList_; contentList_ = nullptr; } diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/PlanetDesktopFragment.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/PlanetDesktopFragment.cpp index 55ef30d06..2348afdd6 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/PlanetDesktopFragment.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/src/PlanetDesktopFragment.cpp @@ -34,6 +34,7 @@ void PlanetDesktopFragment::OnDestroyView() WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlanetDesktopFragment::OnDestroyView"); ClearAppItemToList(); if (planetList_ != nullptr) { + fragmentView_.Remove(planetList_); delete planetList_; planetList_ = nullptr; } diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/themestyle/src/ThemeStyleCatalog.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/themestyle/src/ThemeStyleCatalog.cpp index 5d2f1f87f..8ff59483d 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/themestyle/src/ThemeStyleCatalog.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/themestyle/src/ThemeStyleCatalog.cpp @@ -163,9 +163,6 @@ ThemeStyle GetThemeStyleDropdownNextStyle(ThemeStyle current) return ThemeStyle::HEXAGONS_STYLE; } if (norm == ThemeStyle::HEXAGONS_STYLE) { - return ThemeStyle::PLANET_STYLE; - } - if (norm == ThemeStyle::PLANET_STYLE) { return ThemeStyle::APPLIST_STYLE; } return ThemeStyle::APPLIST_STYLE; -- 2.17.1