解决设置视图右滑难退出问题 992/3
authorluozheng <1732036298@qq.com>
Fri, 20 Sep 2024 12:46:13 +0000 (20:46 +0800)
committerluozheng <1732036298@qq.com>
Fri, 20 Sep 2024 12:46:13 +0000 (20:46 +0800)
code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingView.cpp

index 006795f..9bd7ca5 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-07-12 09:55:29
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-09-20 16:04:46
+ * @LastEditTime: 2024-09-20 20:42:55
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingView.cpp
  */
 
@@ -90,6 +90,7 @@ namespace OHOS
         scrollView->SetHorizontalScrollState(false);
         scrollView->SetTouchable(true);
         scrollView->SetThrowDrag(true);
+        scrollView->SetOnDragListener(presenter_);
         /* -------------------------------------------------------------------------- */
         title = new UILabelExt();
         if (title == nullptr)
@@ -134,7 +135,6 @@ namespace OHOS
         FocusManager::GetInstance()->RequestFocus(contentList);
         FocusManager::GetInstance()->RequestFocusByDirection(FOCUS_DIRECTION_UP);
         contentList->SetRotateFactor(1.0);
-        contentList->SetOnDragListener(presenter_);
         /* ----------------------------------- Add ---------------------------------- */
         scrollView->Add(title);
         scrollView->Add(contentList);