2 * @Author: luozheng 1732036298@qq.com
3 * @Date: 2024-04-25 11:49:58
4 * @LastEditors: luozheng 1732036298@qq.com
5 * @LastEditTime: 2024-05-06 15:00:23
6 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/classicbluetooth/include/BluetoothServiceOptionsView.h
9 #ifndef BLUETOOTH_SERVICE_OPTIONS_VIEW_H
10 #define BLUETOOTH_SERVICE_OPTIONS_VIEW_H
14 #include "components/root_view.h"
15 #include "components/ui_scroll_view.h"
16 #include "components/ui_label_ext.h"
17 #include "components/ui_button.h"
18 #include "components/ui_image_view.h"
19 #include "components/ui_toggle_button.h"
23 class BluetoothServiceOptionsPresenter;
24 class BluetoothServiceOptionsView : public View<BluetoothServiceOptionsPresenter>
33 int16_t fontSize; // 字体大小
34 int16_t lineHeigh; // 行高
35 //const char *text; // 文本
37 uint8_t lineBreakMode; // 断行模式。
39 BluetoothServiceOptionsView();
40 virtual ~BluetoothServiceOptionsView();
41 static BluetoothServiceOptionsView *GetInstance(void);
42 void BluetoothServiceOptionsViewInit(void);
44 UIToggleButton *GetHFP_ToggleButton(void);
45 UIToggleButton *GetA2DP_ToggleButton(void);
48 virtual void OnStart() override;
49 virtual void OnSetUpView() override;
50 virtual void OnTearDownView() override;
51 virtual void OnStop() override;
54 bool SetUpBlueToothScrollView(void);
55 UILabelExt *SetBluetoothServiceOptionsViewLabel(LabelConfig &labelconfig);
56 bool SetUpBlueToothLabel(void);
57 bool SetUpBlueToothToggleButton(void);
58 bool SetUpBlueToothImageView(void);
59 UIScrollView *BlueToothScrollView = nullptr;
60 UILabelExt *Title = nullptr;
61 UILabelExt *HFP_Label{nullptr};
62 UILabelExt *A2DP_Label{nullptr};
63 UIImageView *HFP_Image{nullptr};
64 UIImageView *A2DP_Image{nullptr};
65 UIToggleButton *HFP_ToggleButton{nullptr}; // HFP
66 UIToggleButton *A2DP_ToggleButton{nullptr}; // A2DP
67 bool initViewStatus{false};