delete Title;\r
Title = nullptr;\r
}\r
- if (BlueToothEarPhoneButton != nullptr)\r
- {\r
- delete BlueToothEarPhoneButton;\r
- BlueToothEarPhoneButton = nullptr;\r
- }\r
if (TradionalBlueToothButton != nullptr)\r
{\r
delete TradionalBlueToothButton;\r
delete BluetoothServiceOptionsButton;\r
BluetoothServiceOptionsButton = nullptr;\r
}\r
- if (BlueToothEarPhoneLabel != nullptr)\r
- {\r
- delete BlueToothEarPhoneLabel;\r
- BlueToothEarPhoneLabel = nullptr;\r
- }\r
if (TradionalBlueToothLabel != nullptr)\r
{\r
delete TradionalBlueToothLabel;\r
.height = 35,\r
.fontSize = 30,\r
.lineHeigh = 35,\r
- .textId = STR_BLUETOOTH_HEADPHONES, /*蓝牙耳机*/\r
+ .textId = STR_TRADITIONAL_BLUETOOTH,\r
.lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,\r
};\r
- BlueToothEarPhoneLabel = SetClassicBlueToothViewLabel(labelconfig);\r
- if (nullptr == BlueToothEarPhoneLabel)\r
- {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ClassicBlueToothView::BlueToothEarPhoneLabel is nullptr!");\r
- return false;\r
- }\r
- /* -------------------------------------------------------------------------- */\r
- labelconfig.top = 273;\r
- labelconfig.textId = STR_TRADITIONAL_BLUETOOTH; /*传统蓝牙*/\r
TradionalBlueToothLabel = SetClassicBlueToothViewLabel(labelconfig);\r
if (nullptr == TradionalBlueToothLabel)\r
{\r
return false;\r
}\r
/* -------------------------------------------------------------------------- */\r
- labelconfig.top = 393;\r
+ labelconfig.top = 273;\r
labelconfig.textId = STR_BLUETOOTH_SERVICE_OPTIONS; /*蓝牙服务选项*/\r
BluetoothServiceOptionsLabel = SetClassicBlueToothViewLabel(labelconfig);\r
if (nullptr == BluetoothServiceOptionsLabel)\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ClassicBlueToothView::AttentionLabel is nullptr!");\r
return false;\r
}\r
- AttentionLabel->SetPosition(53, 499, 360, 180); // 位置大小\r
+ int y = 0;\r
+ if (BluetoothServiceOptionsButton)\r
+ {\r
+ y = BluetoothServiceOptionsButton->GetY() + BluetoothServiceOptionsButton->GetHeight() + 39;\r
+ }\r
+ AttentionLabel->SetPosition(53, y, 360, 180); // 位置大小\r
AttentionLabel->SetStyle(STYLE_TEXT_FONT, 20); // 字体大小\r
AttentionLabel->SetStyle(STYLE_LINE_HEIGHT, 30); // 字体行高\r
//.text = "注:开启后10分钟没连接成功会自动关闭,因为传统蓝牙长时间打开会增加电耗,建议在有需要的时候使用(该功能主要用于电话拨打/通知、音乐控制/传输等)",\r
// AttentionLabel->SetTextId(STR_AUTO_OFF_BLUETOOTH_NOTE);\r
- //TODO:多国语言\r
+ // TODO:多国语言\r
AttentionLabel->SetTextId(STR_AUTO_OFF_BLUETOOTH_NOTE2);\r
AttentionLabel->SetTextColor(Color::GetColorFromRGBA(0x99, 0x99, 0x99, 0xff));\r
AttentionLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);\r
// 按钮初始化\r
bool ClassicBlueToothView::SetUpBlueToothButton(void)\r
{\r
- BlueToothEarPhoneButton = new UILabelButtonExt();\r
- if (BlueToothEarPhoneButton == nullptr)\r
- {\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " ClassicBlueToothView::BlueToothEarPhoneButton new fail!");\r
- return false;\r
- }\r
- BlueToothEarPhoneButton->SetPosition(43, 120, 380, 100);\r
- BlueToothEarPhoneButton->SetViewId(BLUETOOTHEARPHONEBUTTON);\r
- BlueToothEarPhoneButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
- BlueToothEarPhoneButton->SetImagePosition(326, 37);\r
- BlueToothEarPhoneButton->SetImageSrc(PNG_SETTING_NEXT_IMAGE, PNG_SETTING_NEXT_IMAGE);\r
- BlueToothEarPhoneButton->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff000000, UIButton::PRESSED);\r
/* -------------------------------------------------------------------------- */\r
TradionalBlueToothButton = new UILabelButtonExt();\r
if (TradionalBlueToothButton == nullptr)\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " ClassicBlueToothView::TradionalBlueToothButton new fail!");\r
return false;\r
}\r
- TradionalBlueToothButton->SetPosition(43, 240, 380, 100);\r
+ TradionalBlueToothButton->SetPosition(43, 120, 380, 100);\r
TradionalBlueToothButton->SetViewId(TRADIONALBLUETOOTHBUTTON);\r
TradionalBlueToothButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
TradionalBlueToothButton->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 16);\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " ClassicBlueToothView::BluetoothServiceOptionsButton new fail!");\r
return false;\r
}\r
- BluetoothServiceOptionsButton->SetPosition(43, 360, 380, 100);\r
+ BluetoothServiceOptionsButton->SetPosition(43, 240, 380, 100);\r
BluetoothServiceOptionsButton->SetViewId(BLUETOOTHSERVICEOPTIONSBUTTON);\r
BluetoothServiceOptionsButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);\r
BluetoothServiceOptionsButton->SetImagePosition(326, 37);\r
BluetoothServiceOptionsButton->SetImageSrc(PNG_SETTING_NEXT_IMAGE, PNG_SETTING_NEXT_IMAGE);\r
BluetoothServiceOptionsButton->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff000000, UIButton::PRESSED);\r
/* -------------------------------------------------------------------------- */\r
- BlueToothEarPhoneButton->SetOnClickListener(presenter_);\r
BluetoothServiceOptionsButton->SetOnClickListener(presenter_);\r
\r
return true;\r
TradionalBlueToothToggleButton = new UIToggleButton();\r
if (nullptr == TradionalBlueToothToggleButton)\r
{\r
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " ClassicBlueToothView::BlueToothEarPhoneButton new fail!");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " ClassicBlueToothView::TradionalBlueToothToggleButton new fail!");\r
return false;\r
}\r
- TradionalBlueToothToggleButton->SetPosition(298, 265, 100, 50);\r
+ TradionalBlueToothToggleButton->SetPosition(298, 145, 100, 50);\r
TradionalBlueToothToggleButton->SetState(ConfigModel::GetInstance()->GetClassicBlueToothState());\r
TradionalBlueToothToggleButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff);\r
TradionalBlueToothToggleButton->SetImages(PNG_TOGGLEBUTTON_ON_IMAGE, PNG_TOGGLEBUTTON_OFF_IMAGE);\r
ClassicBlueToothViewInit();\r
initViewStatus = true;\r
}\r
- if(BlueToothScrollView == nullptr)\r
+ if (BlueToothScrollView == nullptr)\r
{\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothServiceOptionsView::BlueToothScrollView is nullptr!");\r
return;\r
}\r
BlueToothScrollView->Add(Title);\r
- BlueToothScrollView->Add(BlueToothEarPhoneButton);\r
BlueToothScrollView->Add(TradionalBlueToothButton);\r
BlueToothScrollView->Add(BluetoothServiceOptionsButton);\r
- BlueToothScrollView->Add(BlueToothEarPhoneLabel);\r
BlueToothScrollView->Add(TradionalBlueToothLabel);\r
BlueToothScrollView->Add(BluetoothServiceOptionsLabel);\r
BlueToothScrollView->Add(AttentionLabel);\r