#include "UiConfig.h"
#include <graphic_math.h>
#include "bleService.h"
-
+#include "broadcast_feature.h"
namespace OHOS
{
// 当前Presenter属性实例化的内存指针
return;
}
+ static uint32_t time = 0;
+ static uint32_t OnClick_num = 0;
bool WatchQRCodePresenter::OnClick(UIView &view, const ClickEvent &event)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "WatchQRCodePresenter::OnDrag");
if (viewId == WATCHQRCODEVIEWID)
{
if (view_)
+ {
view_->start_refresh_timer();
+ }
+ if (time == 0)
+ {
+ time = event.GetTimeStamp();
+ OnClick_num = 1;
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "222 %d", time);
+ }
+ else
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "111 %d", event.GetTimeStamp());
+ if (event.GetTimeStamp() - time < 2000)
+ {
+ OnClick_num++;
+ if (OnClick_num > 5)
+ {
+ CustomEventPublish(TOPIC_EVENT_DEBUGOUTPUT, NULL, 0);
+ }
+ }
+ else
+ {
+ time = 0;
+ }
+ }
}
return true;
DebugOutputItemView *debugOutputItemView = static_cast<DebugOutputItemView *>(&view);
viewIndex = debugOutputItemView->GetViewIndex();
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "viewIndex:%d", viewIndex);
+ if (viewIndex == 0)
+ {
+ return true;
+ }
ChangeView(0, 1);
SetCurViewIndex(viewIndex);
}
int16_t deltaY;
deltaX = event.GetDeltaX();
deltaY = event.GetDeltaY();
- if (MATH_ABS(deltaX) >= MATH_ABS(deltaY) && MATH_ABS(deltaX) > 30)
+ if (MATH_ABS(deltaX) >= MATH_ABS(deltaY) && MATH_ABS(deltaX) > 20)
{
X_DRAG_FLAG = true;
}