解决息屏状态下录音进度条失效问题
authorluozheng <1732036298@qq.com>
Thu, 12 Mar 2026 03:37:24 +0000 (11:37 +0800)
committerluozheng <1732036298@qq.com>
Thu, 12 Mar 2026 03:37:24 +0000 (11:37 +0800)
code/sdk/application/wearable/n9/nativeapp/nativeui/record/include/RecordingVolumeSettingView.h
code/sdk/application/wearable/n9/nativeapp/nativeui/record/src/RecordingPresenter.cpp

index a4aaf68..bc5b08f 100644 (file)
@@ -20,6 +20,10 @@ namespace OHOS
         static RecordingVolumeSettingView *GetInstance();
         UIScrollView *RecordingVolumeSettingViewInit(void);
         void ClearAll(void);
+        SoundAndVibrationVolumeSettingView *GetSoundAndVibrationVolumeSettingView(void)
+        {
+            return p_SoundAndVibrationVolumeSettingView;
+        }
     private:
         SoundAndVibrationVolumeSettingView *p_SoundAndVibrationVolumeSettingView{nullptr};
         UIScrollView *RecordingVolumeSettingViewScrollView{nullptr};
index 16aee20..b30f644 100644 (file)
@@ -61,6 +61,16 @@ namespace OHOS
     void RecordingPresenter::OnResume(void)\r
     {\r
         RootView::GetInstance()->SetOnKeyActListener(this);\r
+        if(RecordingVolumeSettingView::GetInstance())\r
+        {\r
+            if(RecordingVolumeSettingView::GetInstance()->GetSoundAndVibrationVolumeSettingView())\r
+            {\r
+                if(RecordingVolumeSettingView::GetInstance()->GetSoundAndVibrationVolumeSettingView()->GetVolumeProcess())\r
+                {\r
+                    RecordingVolumeSettingView::GetInstance()->GetSoundAndVibrationVolumeSettingView()->GetVolumeProcess()->RequestFocus();\r
+                }\r
+            }\r
+        }\r
     }\r
 \r
     bool RecordingPresenter::OnDrag(UIView &view, const DragEvent &event)\r