${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AivoiceChatContentListItemView.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AivoiceChatContentListAdapter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/AivoiceReturnResultTextView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/apikeys/ApiKeysDeleteView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/apikeys/ApiKeysPresenter.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/apikeys/NotSetApiKeysView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aivoice/src/apikeys/SetApiKeysView.cpp
#Ai Models
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aimodels/src/AiModelsModel.cpp
STR_MOTION_DETECTION_NOTE = 490,\r
STR_PE4GC = 491,\r
STR_OBU_MESSAGE = 492,\r
- STR_MAX_ID = 493,\r
+ STR_DELETE = 493,\r
+ STR_MAX_ID = 494,\r
}; // UIResourceTextId\r
\r
enum FontLanguageId : uint8_t {\r
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-06-08 09:36:01
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-07-27 18:22:22
+ * @LastEditTime: 2024-07-29 18:28:04
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/respiratorytraining/include/AiVoiceView.h
*/
#ifndef AI_VOICE_VIEW_H
#include "aivoice/include/AivoiceListeningView.h"
#include "aivoice/include/AivoiceThinkingView.h"
#include "aivoice/include/AivoiceReturnResultTextView.h"
+#include "aivoice/include/apikeys/SetApiKeysView.h"
+#include "ui_resource_string.h"
#include "iostream"
#include "string"
#include "map"
static constexpr const char *AIMODEL_DOUBAO_PATH = "/user/res/AIVoice/aimodels/aimodels_doubao.bin"; /*豆包*/
static constexpr const char *AIVOICE_START_CHAT_BUTTON_VIEW_ID = "aivoice_start_chat_button_view_id"; // 开始对话
- static constexpr const char *AIVOICE_CHAT_BUTTON_VIEW_ID = "aivoice_chat_button_view_id"; // 对话
+ static constexpr const char *AIVOICE_CHAT_BUTTON_VIEW_ID = AIVOICE_START_CHAT_BUTTON_VIEW_ID; // 对话
static constexpr const char *AIVOICE_APIKEYS_BUTTON_VIEW_ID = "aivoice_apikeys_button_view_id"; // API Keys
static constexpr const char *AIVOICE_PICKER_VIEW_ID = "aivoice_picker_view_id";
static constexpr const char *AIVOICE_IMGAE_VIEW_ID = "aivoice_imgae_view_id";
AIVOICE_LISTENING_VIEWID, // 聆听中界面
AIVOICE_THINKING_VIEWID, // 思考中界面
AIVOICE_RETURN_RESULT_TEXT_VIEWID, // 返回结果文本界面
+ AIVOICE_APIKEYS, // API Keys界面
MAX_AIVOICE_VIEWID,
} AIVOICEVIEWID;
static AiVoiceView *GetInstance(void);
UIScrollView *GetAiVoiceScrollView(int16_t index);
bool ClickFunc(int16_t interface);
+ bool CheckViewParam(int16_t hideView, int16_t showView);
void ChangeView(int16_t hideView, int16_t showView);
bool ChangeAiVoiceStartChatView(int16_t thisView);
bool ChangeAiVoiceBluetoothFailedStartView(int16_t thisView);
bool ChangeAiVoicListeningView(int16_t thisView);
bool ChangeAiVoicThinkingView(int16_t thisView);
bool ChangeAiVoicReturnResultTextView(int16_t thisView);
+ bool ChangeAiVoicApiKeysView(int16_t thisView);
void SetAiVoiceViewAllComponentsVisibilityStatus();
void ChangeAiModelAndUpdateComponentsStatus(void);
AivoiceListeningView *p_AivoiceListeningView{nullptr};
AivoiceThinkingView *p_AivoiceThinkingView{nullptr};
AivoiceReturnResultTextView *p_AivoiceReturnResultTextView{nullptr};
+ SetApiKeysView *p_SetApiKeysView{nullptr};
private:
UILabelExt *AiVoiceViewLabelInit(LabelConfig &labelconfig);
--- /dev/null
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-07-29 16:14:05
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-07-29 16:24:29
+ * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/apikeys/ApiKeysPresenter.h
+ */
+
+#ifndef AI_MODELS_PRESENTER_H
+#define AI_MODELS_PRESENTER_H
+
+#include "View.h"
+namespace OHOS
+{
+ class ApiKeysPresenter : public UIView::OnClickListener,
+ public UIView::OnDragListener
+ {
+ public:
+ ApiKeysPresenter();
+ virtual ~ApiKeysPresenter();
+ static ApiKeysPresenter *GetInstance();
+
+ private:
+ bool OnClick(UIView &view, const ClickEvent &event) override;
+ bool OnDrag(UIView &view, const DragEvent &event) override;
+ bool OnDragEnd(UIView &view, const DragEvent &event) override;
+
+ bool X_DRAG_FLAG{false};
+ };
+}
+
+#endif
\ No newline at end of file
--- /dev/null
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-07-29 16:00:31
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-07-29 18:22:38
+ * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/apikeys/SetApiKeysView.h
+ */
+
+#ifndef SET_APIKEYS_VIEW_H
+#define SET_APIKEYS_VIEW_H
+
+#include "components/ui_scroll_view.h"
+#include "components/ui_label_ext.h"
+#include "components/ui_image_view.h"
+#include "components/ui_button.h"
+
+namespace OHOS
+{
+ static constexpr const char *SETAPIKEYS_DELETE_BUTTON_VIEWID = "setapikeys_delete_button_viewid";
+ static constexpr const char *SETAPIKEYS_SCROLLVIEW_VIEWID = "setapikeys_scrollview_viewid";
+
+ static constexpr const char *SETAPIKEYS_IMAGE_PATH = "/user/res/AIVoice/apikey.bin";
+ class SetApiKeysView
+ {
+ public:
+ struct LabelConfig
+ {
+ int16_t left;
+ int16_t top;
+ int16_t width;
+ int16_t height;
+ int16_t fontSize;
+ int16_t lineHeigh;
+ uint16_t textId;
+ uint8_t lineBreakMode;
+ };
+
+ SetApiKeysView();
+ ~SetApiKeysView();
+ UIScrollView *CreateSetApiKeysView(void);
+
+ private:
+ UILabelExt *SetApiKeysViewLabelInit(LabelConfig &labelconfig);
+ bool CreateSetApiKeysViewLabel(void);
+ void ClearAll(void);
+ UIScrollView *SetApiKeysScrollView{nullptr};
+ UILabelExt *SetApiKeysTitleLabel{nullptr};
+ UIImageView *SetApiKeysImage{nullptr};
+ UILabelExt *SetApiKeysNoteLabel[2]{nullptr};
+ UILabelExt *SetApiKeysDeleteLabel{nullptr};
+ UIButton *SetApiKeysDeleteButton{nullptr};
+ UIView::OnClickListener *clickListener{nullptr};
+ UIView::OnDragListener *dragListener{nullptr};
+ };
+}
+#endif
\ No newline at end of file
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-06-20 15:11:17
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-07-29 10:32:54
+ * @LastEditTime: 2024-07-29 18:43:03
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp
*/
#include "AppViewIDs.h"
UNUSED(event);
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoicePresenter::OnClick");
- if (strcmp(view.GetViewId(), AIVOICE_IMGAE_VIEW_ID) == 0)
+ if (strcmp(view.GetViewId(), AIVOICE_IMGAE_VIEW_ID) == 0) /*点击的是Ai模型就切换模型*/
{
int index = model->GetSelectAiModel() + 1;
if (index >= AIMODES_MAX_NUM)
{CANCEL_THINKING_BUTTON_VIEW_ID, {AIVOICE_THINKING_VIEWID, AIVOICE_STARTCHAT_VIEWID}}, // 返回一级界面
{AIVOICERETURNRESULTTEXT_RETURN_BUTTON_VIEW_ID, {AIVOICE_RETURN_RESULT_TEXT_VIEWID, AIVOICE_STARTCHAT_VIEWID}}, // 返回一级界面,并清除手表聊天记录
{AIVOICERETURNRESULTTEXT_CONTINUECHAT_BUTTON_VIEW_ID, {AIVOICE_RETURN_RESULT_TEXT_VIEWID, AIVOICE_LISTENING_VIEWID}}, // 返回继续聆听,并清除手表聊天记录
+ {AIVOICE_APIKEYS_BUTTON_VIEW_ID, {AIVOICE_STARTCHAT_VIEWID, AIVOICE_APIKEYS}}, // 进入api keys界面
};
auto it = viewIdMap.find(viewId);
if (it != viewIdMap.end())
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-05-07 11:25:58
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-07-29 10:38:14
+ * @LastEditTime: 2024-07-29 18:54:16
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/AiVoice/src/AiVoiceView.cpp
*/
#include "aivoice/include/AiVoicePresenter.h"
delete p_AivoiceReturnResultTextView;
p_AivoiceReturnResultTextView = nullptr;
}
+
+ if (p_SetApiKeysView != nullptr)
+ {
+ delete p_SetApiKeysView;
+ p_SetApiKeysView = nullptr;
+ }
}
}
return true;
}
+ /*切换到apikeys界面*/
+ bool AiVoiceView::ChangeAiVoicApiKeysView(int16_t thisView)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceView::ChangeAiVoicReturnResultTextView");
+ if (AiVoiceScrollView[thisView] == nullptr)
+ {
+ p_SetApiKeysView = new SetApiKeysView();
+ if (p_SetApiKeysView == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "new AiVoiceScrollView[%d] fail", thisView);
+ return false;
+ }
+ AiVoiceScrollView[thisView] = p_SetApiKeysView->CreateSetApiKeysView();
+ container_->Add(AiVoiceScrollView[thisView]);
+ }
+ return true;
+ }
+
struct AiVoiceViewMapper
{
const int16_t viewId;
{AIVOICE_LISTENING_VIEWID, &AiVoiceView::ChangeAiVoicListeningView},
{AIVOICE_THINKING_VIEWID, &AiVoiceView::ChangeAiVoicThinkingView},
{AIVOICE_RETURN_RESULT_TEXT_VIEWID, &AiVoiceView::ChangeAiVoicReturnResultTextView},
+ {AIVOICE_APIKEYS, &AiVoiceView::ChangeAiVoicApiKeysView},
};
bool AiVoiceView::ClickFunc(int16_t interface)
return false;
}
+ bool AiVoiceView::CheckViewParam(int16_t hideView, int16_t showView)
+ {
+ if (showView < 0 || showView >= MAX_AIVOICE_VIEWID)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceView::CheckViewParam showView err.");
+ return false;
+ }
+
+ if (hideView < 0 || hideView >= MAX_AIVOICE_VIEWID)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceView::CheckViewParam hideView err.");
+ return false;
+ }
+
+ return true;
+ }
+
void AiVoiceView::ChangeView(int16_t hideView, int16_t showView)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceView::ChangeView");
- if (hideView > MAX_AIVOICE_VIEWID)
+ if (!CheckViewParam(hideView, showView))
{
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Overstep ones bounds");
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AiVoiceView::CheckViewParam failed.");
return;
}
AiVoiceScrollView[hideView]->SetVisible(false);
--- /dev/null
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-07-29 16:14:16
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-07-29 18:25:52
+ * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/apikeys/ApiKeysPresenter.cpp
+ */
+
+#include "aivoice/include/apikeys/ApiKeysPresenter.h"
+#include "aivoice/include/apikeys/SetApiKeysView.h"
+#include "aivoice/include/AiVoiceView.h"
+#include "wearable_log.h"
+#include "UiConfig.h"
+#include "iostream"
+#include "string"
+namespace OHOS
+{
+
+ static ApiKeysPresenter *g_pApiKeysPresenter = nullptr;
+ ApiKeysPresenter::ApiKeysPresenter()
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApiKeysPresenter::ApiKeysPresenter");
+ g_pApiKeysPresenter = this;
+ }
+
+ ApiKeysPresenter::~ApiKeysPresenter()
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApiKeysPresenter::ApiKeysPresenter");
+ g_pApiKeysPresenter = nullptr;
+ }
+
+ ApiKeysPresenter *ApiKeysPresenter::GetInstance()
+ {
+ return g_pApiKeysPresenter;
+ }
+
+ bool ApiKeysPresenter::OnClick(UIView &view, const ClickEvent &event)
+ {
+ UNUSED(event);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApiKeysPresenter::OnClick");
+ std::string viewId = view.GetViewId();
+ if (viewId == SETAPIKEYS_DELETE_BUTTON_VIEWID)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SETAPIKEYS_DELETE_BUTTON_VIEWID");
+ }
+ return true;
+ }
+
+ bool ApiKeysPresenter::OnDrag(UIView &view, const DragEvent &event)
+ {
+ UNUSED(view);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApiKeysPresenter::OnDrag");
+ if ((event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) // 拖动过程中判断是否是水平滑动
+ {
+ ApiKeysPresenter::X_DRAG_FLAG = true;
+ }
+ return true;
+ }
+
+ bool ApiKeysPresenter::OnDragEnd(UIView &view, const DragEvent &event)
+ {
+ UNUSED(view);
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ApiKeysPresenter::OnDragEnd");
+ std::string viewId = view.GetViewId();
+ if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && X_DRAG_FLAG)
+ {
+ AiVoiceView *p_AiVoiceView = AiVoiceView::GetInstance();
+ if (p_AiVoiceView != nullptr && viewId == SETAPIKEYS_SCROLLVIEW_VIEWID)
+ {
+ p_AiVoiceView->ChangeView(AIVOICE_APIKEYS, AIVOICE_STARTCHAT_VIEWID);
+ }
+ X_DRAG_FLAG = false;
+ }
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-07-29 16:04:23
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-07-29 19:12:42
+ * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/apikeys/SetApiKeysView.cpp
+ */
+
+#include "aivoice/include/apikeys/SetApiKeysView.h"
+#include "aivoice/include/apikeys/ApiKeysPresenter.h"
+#include "wearable_log.h"
+#include "ui_resource_string.h"
+namespace OHOS
+{
+ SetApiKeysView::SetApiKeysView()
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::SetApiKeysView");
+ }
+
+ SetApiKeysView::~SetApiKeysView()
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::~SetApiKeysView");
+ ClearAll();
+ }
+
+ void SetApiKeysView::ClearAll(void)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::ClearAll");
+
+ if (SetApiKeysScrollView != nullptr)
+ {
+ SetApiKeysScrollView->RemoveAll();
+ if (clickListener != nullptr)
+ {
+ delete clickListener;
+ clickListener = nullptr;
+ }
+ if (dragListener != nullptr)
+ {
+ delete dragListener;
+ dragListener = nullptr;
+ }
+ if (SetApiKeysTitleLabel != nullptr)
+ {
+ delete SetApiKeysTitleLabel;
+ SetApiKeysTitleLabel = nullptr;
+ }
+ if (SetApiKeysImage != nullptr)
+ {
+ delete SetApiKeysImage;
+ SetApiKeysImage = nullptr;
+ }
+ if (SetApiKeysDeleteLabel != nullptr)
+ {
+ delete SetApiKeysDeleteLabel;
+ SetApiKeysDeleteLabel = nullptr;
+ }
+ if (SetApiKeysNoteLabel[0] != nullptr)
+ {
+ delete SetApiKeysNoteLabel[0];
+ SetApiKeysNoteLabel[0] = nullptr;
+ }
+ if (SetApiKeysNoteLabel[1] != nullptr)
+ {
+ delete SetApiKeysNoteLabel[1];
+ SetApiKeysNoteLabel[1] = nullptr;
+ }
+ if (SetApiKeysDeleteButton != nullptr)
+ {
+ delete SetApiKeysDeleteButton;
+ SetApiKeysDeleteButton = nullptr;
+ }
+ delete SetApiKeysScrollView;
+ SetApiKeysScrollView = nullptr;
+ }
+ }
+
+ UILabelExt *SetApiKeysView::SetApiKeysViewLabelInit(LabelConfig &labelconfig)
+ {
+ UILabelExt *label = new UILabelExt();
+ if (label == nullptr)
+ {
+ return nullptr;
+ }
+ label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height);
+ label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize);
+ label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeigh);
+ label->SetTextId(labelconfig.textId);
+ label->SetLineBreakMode(labelconfig.lineBreakMode);
+ label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+ label->SetRollSpeed(70);
+ label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelconfig.fontSize);
+ return label;
+ }
+
+ bool SetApiKeysView::CreateSetApiKeysViewLabel(void)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceView::CreateAiVoiceViewLabel");
+ LabelConfig labelConfig = {
+ .left = 83,
+ .top = 50,
+ .width = 300,
+ .height = 35,
+ .fontSize = 30,
+ .lineHeigh = 35,
+ .textId = STR_API_KEYS, /*API Keys*/
+ .lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
+ };
+ SetApiKeysTitleLabel = SetApiKeysViewLabelInit(labelConfig);
+ if (SetApiKeysTitleLabel == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::SetApiKeysTitleLabel new fail!");
+ return false;
+ }
+ SetApiKeysScrollView->Add(SetApiKeysTitleLabel);
+ /* -------------------------------------------------------------------------- */
+ int textId[] = {STR_KHBB, STR_GTAS};
+ for (int i = 0; i < static_cast<int>((sizeof(textId) / sizeof(textId[0]))); i++)
+ {
+ labelConfig.left = 53;
+ labelConfig.top = 235 + i * 35;
+ labelConfig.width = 360;
+ labelConfig.textId = textId[i];
+ SetApiKeysNoteLabel[i] = SetApiKeysViewLabelInit(labelConfig);
+ if (SetApiKeysNoteLabel[i] == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::SetApiKeysNoteLabel[%d] new fail!", i);
+ return false;
+ }
+ SetApiKeysScrollView->Add(SetApiKeysNoteLabel[i]);
+ }
+ /* -------------------------------------------------------------------------- */
+ labelConfig.left = 133;
+ labelConfig.top = 368;
+ labelConfig.width = 200;
+ labelConfig.textId = STR_DELETE; /*删除*/
+ SetApiKeysDeleteLabel = SetApiKeysViewLabelInit(labelConfig);
+ if (SetApiKeysDeleteLabel == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::SetApiKeysDeleteLabel new fail!");
+ return false;
+ }
+ SetApiKeysScrollView->Add(SetApiKeysDeleteLabel);
+ return true;
+ }
+
+ /*成功配置了API Keys视图*/
+ UIScrollView *SetApiKeysView::CreateSetApiKeysView(void)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::CreateSetApiKeysView");
+ if (SetApiKeysScrollView == nullptr)
+ {
+ WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::CreateAiVoiceScrollView");
+ SetApiKeysScrollView = new UIScrollView();
+ if (SetApiKeysScrollView == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::CreateSetApiKeysScrollView new fail!");
+ return nullptr;
+ }
+ SetApiKeysScrollView->SetPosition(0, 0, 466, 466);
+ SetApiKeysScrollView->SetViewId(SETAPIKEYS_SCROLLVIEW_VIEWID);
+ SetApiKeysScrollView->SetTouchable(true);
+ SetApiKeysScrollView->SetDraggable(true);
+ if (dragListener == nullptr)
+ {
+ dragListener = new ApiKeysPresenter();
+ if (dragListener == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::dragListener new fail!");
+ }
+ }
+ SetApiKeysScrollView->SetOnDragListener(dragListener);
+ /* -------------------------------------------------------------------------- */
+ SetApiKeysImage = new UIImageView();
+ if (SetApiKeysImage == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::SetApiKeysImage new fail!");
+ }
+ SetApiKeysImage->SetPosition(193, 121, 80, 80);
+ SetApiKeysImage->SetSrc(SETAPIKEYS_IMAGE_PATH);
+ SetApiKeysScrollView->Add(SetApiKeysImage);
+ /* -------------------------------------------------------------------------- */
+ SetApiKeysDeleteButton = new UIButton();
+ if (SetApiKeysDeleteButton == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::SetApiKeysDeleteButton new fail!");
+ return nullptr;
+ }
+ SetApiKeysDeleteButton->SetPosition(93, 340, 280, 90);
+ SetApiKeysDeleteButton->SetViewId(SETAPIKEYS_DELETE_BUTTON_VIEWID);
+ SetApiKeysDeleteButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xfffd5213);
+ SetApiKeysDeleteButton->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);
+ if (clickListener == nullptr)
+ {
+ clickListener = new ApiKeysPresenter();
+ if (clickListener == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetApiKeysView::clickListener new fail!");
+ }
+ }
+ SetApiKeysDeleteButton->SetOnClickListener(clickListener);
+ SetApiKeysScrollView->Add(SetApiKeysDeleteButton);
+ /* -------------------------------------------------------------------------- */
+ if (!CreateSetApiKeysViewLabel())
+ {
+ return nullptr;
+ }
+ }
+ return SetApiKeysScrollView;
+ }
+}
\ No newline at end of file
STR_PTALORTM$Please try again later or replace the model\r
STR_MOTION_DETECTION_NOTE$It seems that you are performing XX movement, whether to start recording\r
STR_PE4GC$Please enable 4G capability\r
-STR_OBU_MESSAGE$OBU
\ No newline at end of file
+STR_OBU_MESSAGE$OBU\r
+STR_DELETE$Delete
\ No newline at end of file
STR_PTALORTM$请稍后再重试或更换模型\r
STR_MOTION_DETECTION_NOTE$检测到您好像在进行XX运动,是否开始记录\r
STR_PE4GC$请开启4G能力\r
-STR_OBU_MESSAGE$OBU
\ No newline at end of file
+STR_OBU_MESSAGE$OBU\r
+STR_DELETE$删除
\ No newline at end of file
<lanstr id="STR_MOTION_DETECTION_NOTE" value="It seems that you are performing XX movement, whether to start recording"/>
<lanstr id="STR_PE4GC" value="Please enable 4G capability"/>
<lanstr id="STR_OBU_MESSAGE" value="OBU"/>
+ <lanstr id="STR_DELETE" value="Delete"/>
</language>
<lanstr id="STR_MOTION_DETECTION_NOTE" value="检测到您好像在进行XX运动,是否开始记录"/>
<lanstr id="STR_PE4GC" value="请开启4G能力"/>
<lanstr id="STR_OBU_MESSAGE" value="OBU"/>
+ <lanstr id="STR_DELETE" value="删除"/>
</language>
STR_MOTION_DETECTION_NOTE = 490,\r
STR_PE4GC = 491,\r
STR_OBU_MESSAGE = 492,\r
- STR_MAX_ID = 493,\r
+ STR_DELETE = 493,\r
+ STR_MAX_ID = 494,\r
}; // UIResourceTextId\r
enum FontLanguageId : uint8_t {
--- /dev/null
+version https://git-lfs.github.com/spec/v1
+oid sha256:8ad2ddb484b56ca94fdfc8fbc45391ffcbae9e2f3d2c7a679daef45f73ce59d9
+size 4504
STR_MOTION_DETECTION_NOTE = 490,\r
STR_PE4GC = 491,\r
STR_OBU_MESSAGE = 492,\r
- STR_MAX_ID = 493,\r
+ STR_DELETE = 493,\r
+ STR_MAX_ID = 494,\r
}; // UIResourceTextId\r
enum FontLanguageId : uint8_t {