From: luozheng <1732036298@qq.com> Date: Mon, 30 Sep 2024 09:14:01 +0000 (+0800) Subject: 解决#802录音列表有遮挡显示不全bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=37e4dd2f5da1a0a433114e6c611733227ebb93a4;p=mirrors%2FFD230.git 解决#802录音列表有遮挡显示不全bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordListView.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordListView.cpp index ef4c677d9..4075e9ea7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordListView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordListView.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-02-27 09:16:50 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-02 09:57:10 + * @LastEditTime: 2024-09-30 17:06:25 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordListView.cpp */ @@ -276,7 +276,7 @@ namespace OHOS return false; } } - recordList->SetPosition(43, 120, 380, 340); + recordList->SetPosition(43, 100, 380, 330); recordList->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000); recordList->SetThrowDrag(true); // 设置手指抬起屏幕后是否继续滚动。 recordList->SetTouchable(true); @@ -285,7 +285,7 @@ namespace OHOS recordList->SetDragACCLevel(5); recordList->SetSwipeACCLevel(800); /*设置手指抬起屏幕后的补偿距离。*/ recordList->SetReboundSize(30); - // recordList->SetScrollBlankSize(30); + recordList->SetScrollBlankSize(20); recordList->SetIntercept(true); // 设置是否拦截输入事件。如果被截获,视图在本地处理后不会将输入事件传递给父视图。 recordList->SetAdapter(p_RecordingListAdapter); RecordListScrollView->Add(recordList); diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp index 35b31b4ff..8b98d97fa 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp @@ -590,6 +590,7 @@ namespace OHOS void RecordingModel::InitRecordingListItem(void) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RecordingModel::InitRecordingListItem"); + /* ---------------------------------- 清空操作 --------------------------------- */ if (!Recordings.empty()) { Recordings.clear(); @@ -605,6 +606,8 @@ namespace OHOS memset(info[i].recordingTime, 0, sizeof(info[i].recordingTime)); } RecordingMp3FileCount = 0; + MaxRecordingNumber = 0; + /* -------------------------------------------------------------------------- */ SearchFiles(directory, Recordings, RecordingMp3FileCount); if (RecordingMp3FileCount != 0) {