From 6b1d9ff77ae706ff25ccbdd9bfa3e14f26b6b826 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Fri, 13 Dec 2024 16:41:19 +0800 Subject: [PATCH] =?utf8?q?1.=E8=A7=A3=E5=86=B3#1190,=E6=97=A5=E7=A8=8B?= =?utf8?q?=E7=AE=A1=E7=90=86=E6=89=B9=E9=87=8F=E5=90=8C=E6=AD=A5=E7=9A=84?= =?utf8?q?=E6=97=B6=E5=80=99=EF=BC=8C=E6=89=8B=E8=A1=A8=E7=AB=AF=E5=8F=AA?= =?utf8?q?=E6=98=BE=E7=A4=BA=E6=9C=89=E4=B8=94=E6=9C=80=E5=90=8E=E4=B8=80?= =?utf8?q?=E6=9D=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/schedule/include/ScheduleView.h | 1 + .../nativeui/schedule/src/SchedulePresenter.cpp | 3 ++- .../fd230app/nativeui/schedule/src/ScheduleView.cpp | 10 ++++++++++ .../wearable/service/ble_service/bleservice/bleEvent.c | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h b/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h index f154f4189..bd0206208 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h @@ -47,6 +47,7 @@ namespace OHOS void ItemListAdd(const ScheduleListItemInfo &item); void ItemListClear(void); void ItemListContentUpdate(void); + void ItemListScrollByUpdate(bool isUpScroll = false); void ContentScreenItemIndexSet(uint8_t index); uint8_t ContentScreenItemIndexGet(void); diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/SchedulePresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/SchedulePresenter.cpp index 9d59cfbab..761745a76 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/SchedulePresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/SchedulePresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-06-20 15:11:17 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-11-30 17:38:58 + * @LastEditTime: 2024-12-13 16:28:48 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/SchedulePresenter.cpp */ #include "AppViewIDs.h" @@ -100,6 +100,7 @@ namespace OHOS ScheduleModel_->ScheduleOriginalDataSetByUI(view_->ContentScreenItemIndexGet() / 2); view_->ItemListContentUpdate(); view_->DisplayDataOrNoScreen(); + view_->ItemListScrollByUpdate(); return true; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp index 1dfb891bb..b3c9bd5ff 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp @@ -797,6 +797,16 @@ namespace OHOS } } + /// @brief 列表滚动更新 + /// @param isUpScroll true 向上滚动,反之向下滚动 + void ScheduleView::ItemListScrollByUpdate(bool isUpScroll) + { + if(ScheduleList_) + { + ScheduleList_->ScrollBy(isUpScroll ? -240 : 240); + } + } + void ScheduleView::ResetScheduleList(void) { if(ScheduleListAdapter_ == nullptr || ScheduleList_== nullptr) diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c index ad5ac220b..954d8376e 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c @@ -3312,7 +3312,7 @@ bool bin_Check_schedule(uint8_t *data,uint16_t len) else Ble_Set_ScheduleInfo(id_,timetemp_begin,timetemp_end,title,str_,false); - id++; + id_++; if(title) -- 2.17.1