* @Author: luozheng 1732036298@qq.com
* @Date: 2024-08-03 11:10:08
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-31 15:11:39
+ * @LastEditTime: 2024-09-03 10:18:56
* @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceConnectingView.cpp
*/
#include "aivoice/include/AiVoiceConnectingView.h"
delete connectingAnimatorView;
connectingAnimatorView = nullptr;
FreeImageInfoArray(connectingPathsArray, AIVoiceListeningImagePaths, AIVOICE_CONNECTING_IMAGE_ANIMATOR_VIEW_NUM_FRAMES);
-
}
if (cancelLabel)
{
animatorView->SetPosition(imageanimatorconfig.x, imageanimatorconfig.y, imageanimatorconfig.width, imageanimatorconfig.height);
animatorView->SetImageAnimatorSrc(imageanimatorconfig.imageInfoArray, imageanimatorconfig.numFrames, imageanimatorconfig.delay);
animatorView->SetRepeat(true);
+ animatorView->SetSizeFixed(true);
// animatorView->SetAutoEnable(false);
// animatorView->SetResizeMode(UIImageAnimatorView::FILL);
animatorView->Start();
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AiVoiceConnectingView::CreateAiVoiceConnectingView fail!!");
return nullptr;
}
+ connectingAnimatorView->SetPosition(183, 183);
+ connectingAnimatorView->Invalidate();
scrollView->Add(connectingAnimatorView);
return scrollView;
}
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-02-20 10:27:30
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-25 14:18:02
+ * @LastEditTime: 2024-09-03 10:29:03
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/classicbluetooth/include/BluetoothServiceOptionsPresenter.h
*/
#ifndef BLUETOOTH_SERVICE_OPTIONS_PRESENTER_H
bool OnDrag(UIView &view, const DragEvent &event) override;
bool OnDragEnd(UIView &view, const DragEvent &event) override;
bool OnKeyAct(UIView &view, const KeyEvent &event) override;
+ bool X_DRAG_FLAG{false};
};
}
std::map<UIView *, std::string> buttonMap = {
{classicBlueToothView->GetHFP_ToggleButton(), "HFP"},
- {
- classicBlueToothView->GetA2DP_ToggleButton(),
- "A2DP",
- }};
+ {classicBlueToothView->GetA2DP_ToggleButton(),"A2DP",},
+ };
auto it = buttonMap.find(&view);
if (it != buttonMap.end())
{
UNUSED(view);
UNUSED(event);
+ if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) {
+ int16_t deltaX;
+ int16_t deltaY;
+ deltaX = event.GetDeltaX();
+ deltaY = event.GetDeltaY();
+ if (MATH_ABS(deltaX) >= MATH_ABS(deltaY) && MATH_ABS(deltaX) > 30) {
+ // MainAlarmView::GetInstance()->DropView(view);
+ X_DRAG_FLAG = true;
+ }
+ }
return true;
}
{
UNUSED(view);
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothServiceOptionsPresenter::OnDragEnd");
- if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT)
+ if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && X_DRAG_FLAG)
{
if(! BluetoothServiceOptionsView::GetInstance()->get_connectview_Visible())
NativeAbility::GetInstance().Back();
+ X_DRAG_FLAG = false;
}
return true;
return false;
}
BlueToothScrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
- BlueToothScrollView->SetScrollBlankSize(35);
- BlueToothScrollView->SetReboundSize(50);
+ // BlueToothScrollView->SetScrollBlankSize(35);
+ // BlueToothScrollView->SetReboundSize(50);
BlueToothScrollView->SetDirection(1);
UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(BluetoothServiceOptionsPresenter::GetInstance());
if (draglistener == nullptr)
label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeigh); // 字体行高
label->SetTextId(labelconfig.textId);
label->SetLineBreakMode(labelconfig.lineBreakMode); // 断行模式。
+ label->SetRollSpeed(70);
label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelconfig.fontSize);
return label;
}