From: luozheng <1732036298@qq.com> Date: Fri, 1 Nov 2024 02:51:34 +0000 (+0800) Subject: 日程优化 X-Git-Tag: fd230_release_V1.3.102~29^2~89 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1313%2F1;p=mirrors%2FFD230.git 日程优化 --- 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 9a8417591..537f42026 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/include/ScheduleView.h @@ -56,6 +56,9 @@ namespace OHOS void DisplayDeleteScreen(void); private: + + void ResetScheduleList(void); + UIViewGroup * InitNoDataScreen(); void DeinitNoDataScreen(); UILabelExt * InitLabel(int16_t x, int16_t y, int16_t width, int16_t height, 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 67957cde4..86b737da4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/schedule/src/ScheduleView.cpp @@ -128,6 +128,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d]:DisplayMainScreen", __LINE__); DisplaySelectScreen(ENUM_SCHEDULE_SCREEN_LIST); + ResetScheduleList(); ScheduleList_->RefreshList(); } } @@ -349,6 +350,7 @@ namespace OHOS ScheduleList_->SetRotateFactor(2); // 增加表冠控制 ScheduleList_->RequestFocus(); + ResetScheduleList(); DataGroup_->Add(ScheduleList_); } @@ -793,4 +795,20 @@ namespace OHOS } } + void ScheduleView::ResetScheduleList(void) + { + if(ScheduleListAdapter_ == nullptr || ScheduleList_== nullptr) + { + return; + } + + if(ScheduleListAdapter_->GetCount() > 2) + { + ScheduleList_->SetReboundSize(30); + } + else + { + ScheduleList_->SetReboundSize(0); + } + } } \ No newline at end of file