diff --git a/frameworks/components/ui_abstract_scroll.cpp b/frameworks/components/ui_abstract_scroll.cpp index e7f9d4d9de1351da9ff0454fd7fe5d1de50c3fd1..714d9dd32f3fb262c460c65a21ab40f35eb6d6e2 100755 --- a/frameworks/components/ui_abstract_scroll.cpp +++ b/frameworks/components/ui_abstract_scroll.cpp @@ -289,7 +289,7 @@ void UIAbstractScroll::ListAnimatorCallback::Callback(UIView* view) UIAbstractScroll* scrollView = static_cast(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(); diff --git a/test/uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp b/test/uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp index a65e3deb4df8c99d0c52cf982f3ee502f877ddec..422e8fe503a301804e97e49997957c3f2320d202 100755 --- a/test/uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp +++ b/test/uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp @@ -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);