提交 1eccea2e 编写于 作者: O openharmony_ci 提交者: Gitee

!211 修复scroll view rebound 功能失效

Merge pull request !211 from guyuanzhang/scroll_master
......@@ -289,7 +289,7 @@ void UIAbstractScroll::ListAnimatorCallback::Callback(UIView* view)
UIAbstractScroll* scrollView = static_cast<UIAbstractScroll*>(view);
scrollView->isDragging_ = true;
curtTime_++;
if (curtTime_ <= dragTimes_) {
bool needStopX = false;
bool needStopY = false;
......@@ -313,8 +313,6 @@ void UIAbstractScroll::ListAnimatorCallback::Callback(UIView* view)
}
if (needStopX && needStopY) {
scrollView->StopAnimator();
} else {
curtTime_++;
}
} else {
scrollView->StopAnimator();
......
......@@ -119,6 +119,7 @@ void UITestUIScrollView::UIKit_UIScrollView_Test_bar_001()
scroll->SetPosition(positionX_, positionY_, g_scrollW, g_scrollH);
VISIBLE_XBAR(false);
scroll->SetYScrollBarVisible(true);
scroll->SetReboundSize(50); // 50 : rebound size
container_->Add(scroll);
UILabelButton* button1 = new UILabelButton();
button1->SetPosition(0, 0, g_buttonW, g_buttonH);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册