禅道1655,解决手表,进入卡片管理后,等待手表自动息屏,息屏后再主动唤醒屏幕,旋转编码器,无法旋转切换卡片bug 3047/1
authorluozheng <1732036298@qq.com>
Thu, 8 Jan 2026 03:21:55 +0000 (11:21 +0800)
committerluozheng <1732036298@qq.com>
Thu, 8 Jan 2026 03:21:55 +0000 (11:21 +0800)
code/sdk/application/wearable/fd272/nativeapp/nativeui/add_card/include/AddCardView.h
code/sdk/application/wearable/fd272/nativeapp/nativeui/add_card/src/AddCardPresenter.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/add_card/src/AddCardView.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/set_card/include/SetCardPresenter.h
code/sdk/application/wearable/fd272/nativeapp/nativeui/set_card/include/SetCardView.h
code/sdk/application/wearable/fd272/nativeapp/nativeui/set_card/src/SetCardPresenter.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/set_card/src/SetCardView.cpp

index e82b8cd..fdd9784 100644 (file)
@@ -38,6 +38,7 @@ public:
     
     void RefreshCardList(void);
     void ExceedsCardCountEvent(bool isVisible);
+    UIList *GetAddCardList(void);
 private:
     void SetUpListInfo(void);
     void SetUpListView(void);
index df60ed0..cd99156 100644 (file)
@@ -37,6 +37,10 @@ namespace OHOS
     void AddCardPresenter::OnResume()
     {
         RootView::GetInstance()->SetOnKeyActListener(this);
+        if (view_->GetAddCardList() != nullptr)
+        {
+            view_->GetAddCardList()->RequestFocus();
+        }
     }
 
     bool AddCardPresenter::OnDrag(UIView &view, const DragEvent &event)
index 87a1c46..f6b63f6 100644 (file)
@@ -71,6 +71,11 @@ namespace OHOS
         }
     }
 
+    UIList *AddCardView::GetAddCardList(void)
+    {
+        return &contentList_;
+    }
+
     void AddCardView::SetUpListView(void)
     {
         contentList_.SetPosition(0, 0);
index 5c711a6..32901cd 100644 (file)
@@ -48,7 +48,6 @@ public:
     
     void OnStart() override;
     void OnResume() override;
-    void OnStop() override;
     bool OnClick(UIView &view, const ClickEvent &event) override;
     void OnScrollStart(int16_t index, UIView *view) override;
     void OnScrollEnd(int16_t index, UIView *view) override;
index 32b60a9..6940b92 100644 (file)
@@ -42,6 +42,7 @@ public:
     void ShowAddView(bool show);
     void RefreshCardList(void);
     void SaveSelectCardIndex(void);
+    UIList *GetCardList(void);
 private:
     void SetUpListInfo(void);
     void SetUpListView(void);
index 19b9239..85c978e 100644 (file)
@@ -31,12 +31,13 @@ namespace OHOS
 
     void SetCardPresenter::OnResume(void)
     {
+        if (view_->GetCardList() != nullptr)
+        {
+            view_->GetCardList()->RequestFocus();
+        }
     }
 
-    void SetCardPresenter::OnStop(void)
-    {
     
-    }
 
     bool SetCardPresenter::OnClick(UIView &view, const ClickEvent &event)
     {
index 89e76c8..8d88bec 100644 (file)
 namespace OHOS {
 SetCardView::SetCardView():contentList_(UIList::HORIZONTAL)
 {
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::SetCardView");
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetCardView::SetCardView");
 }
 
 SetCardView::~SetCardView()
 {
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetCardView::~SetCardView");
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetCardView::~SetCardView");
     if (deleteView_ != nullptr) {
         delete deleteView_;
         deleteView_ = nullptr;
@@ -77,6 +77,11 @@ void SetCardView::SetUpListInfo(void)
     }
 }
 
+UIList *SetCardView::GetCardList(void)
+{
+    return &contentList_;
+}
+
 void SetCardView::SetUpListView(void)
 {
     addImg_.SetPosition(187, 10);