WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RespiratoryTrainingView::ChangeRespiratoryTrainingView");
if (RespiratoryTrainingScrollView[thisView] == nullptr)
{
- AddViewToRootContainer(RespiratoryTrainingScrollView[thisView]);
+ group->Add(RespiratoryTrainingScrollView[thisView]);
}
if (TrainingDurationSelectiontitlelabel)
{
return false;
}
RespiratoryTrainingScrollView[thisView] = scrollView;
- AddViewToRootContainer(RespiratoryTrainingScrollView[thisView]);
+ group->Add(RespiratoryTrainingScrollView[thisView]);
}
return true;
}
return false;
}
RespiratoryTrainingScrollView[thisView] = scrollView;
- AddViewToRootContainer(RespiratoryTrainingScrollView[thisView]);
+ group->Add(RespiratoryTrainingScrollView[thisView]);
}
return true;
}
RespiratoryTrainingScrollView[RESPIRATORYTRAINING]->SetHorizontalScrollState(false);
RespiratoryTrainingScrollView[RESPIRATORYTRAINING]->SetTouchable(true);
RespiratoryTrainingScrollView[RESPIRATORYTRAINING]->SetDraggable(true);
- AddViewToRootContainer(RespiratoryTrainingScrollView[RESPIRATORYTRAINING]);
+ group->Add(RespiratoryTrainingScrollView[RESPIRATORYTRAINING]);
return true;
}
void RespiratoryTrainingView::ClearAll(void)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[RespiratoryTrainingView]ClearAll start");
+ if(group != nullptr)
+ {
+ group->RemoveAll();
+ delete group;
+ group = nullptr;
+ }
if (RespiratoryTrainingScrollView[RESPIRATORYTRAINING] != nullptr)
{
RespiratoryTrainingScrollView[RESPIRATORYTRAINING]->RemoveAll();
void RespiratoryTrainingView::OnStart()
{
-
+ if (group == nullptr)
+ {
+ group = new UIViewGroup();
+ group->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight());
+ group->SetOnDragListener(presenter_);
+ AddViewToRootContainer(group);
+ }
+ RespiratoryTrainingViewInit();
RootView::GetInstance()->SetDraggable(true);
RootView::GetInstance()->SetTouchable(true);
- RootView::GetInstance()->SetOnDragListener(presenter_);
RootView::GetInstance()->SetOnKeyActListener(presenter_);
- RespiratoryTrainingViewInit();
}
}
\ No newline at end of file
if ((MATH_ABS(dragLen_.x) >= DRAG_LIMIT_X) || (MATH_ABS(dragLen_.y) >= DRAG_LIMIT_Y)) {
// if ((MATH_ABS(dragLen_.x) >= INDEV_DRAG_LIMIT) || (MATH_ABS(dragLen_.y) >= INDEV_DRAG_LIMIT)) {
// HISI delete begin
- //if ((touchableView_ != nullptr) && !cancelSent_) {
- // DispatchCancelEvent();
- //}
+ if ((touchableView_ != nullptr) && !cancelSent_) {
+ DispatchCancelEvent();
+ }
// HISI delete end
printf("=====PointerInputDevice::DispatchDragStartEvent absx(%d) limitx(%d) absy(%d) limity(%d) \r\n",
MATH_ABS(dragLen_.x),DRAG_LIMIT_X,