}
/// <summary>
- /// An event emitted when the scrolling starts, user can subscribe or unsubscribe to this event handler.<br />
+ /// An event emitted when user starts dragging ScrollableBase, user can subscribe or unsubscribe to this event handler.<br />
/// </summary>
/// <since_tizen> 6 </since_tizen>
/// This may be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API
[EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler<ScrollEventArgs> ScrollStartedEvent;
+ public event EventHandler<ScrollEventArgs> ScrollDragStartEvent;
/// <summary>
- /// An event emitted when the scrolling ends, user can subscribe or unsubscribe to this event handler.<br />
+ /// An event emitted when user stops dragging ScrollableBase, user can subscribe or unsubscribe to this event handler.<br />
/// </summary>
/// <since_tizen> 6 </since_tizen>
/// This may be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API
[EditorBrowsable(EditorBrowsableState.Never)]
- public event EventHandler<ScrollEventArgs> ScrollEndedEvent;
+ public event EventHandler<ScrollEventArgs> ScrollDragEndEvent;
+
+
+ /// <summary>
+ /// An event emitted when the scrolling slide animation starts, user can subscribe or unsubscribe to this event handler.<br />
+ /// </summary>
+ /// <since_tizen> 6 </since_tizen>
+ /// This may be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<ScrollEventArgs> ScrollAnimationStartEvent;
+
+ /// <summary>
+ /// An event emitted when the scrolling slide animation ends, user can subscribe or unsubscribe to this event handler.<br />
+ /// </summary>
+ /// <since_tizen> 6 </since_tizen>
+ /// This may be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<ScrollEventArgs> ScrollAnimationEndEvent;
+
+
private Animation scrollAnimation;
private float maxScrollDistance;
mScrollingChild = new View();
}
- private void OnScrollStart()
+ private void OnScrollDragStart()
+ {
+ ScrollEventArgs eventArgs = new ScrollEventArgs();
+ ScrollDragStartEvent?.Invoke(this, eventArgs);
+ }
+
+ private void OnScrollDragEnd()
+ {
+ ScrollEventArgs eventArgs = new ScrollEventArgs();
+ ScrollDragEndEvent?.Invoke(this, eventArgs);
+ }
+
+ private void OnScrollAnimationStart()
{
ScrollEventArgs eventArgs = new ScrollEventArgs();
- ScrollStartedEvent?.Invoke(this, eventArgs);
+ ScrollAnimationStartEvent?.Invoke(this, eventArgs);
}
- private void OnScrollEnd()
+ private void OnScrollAnimationEnd()
{
ScrollEventArgs eventArgs = new ScrollEventArgs();
- ScrollEndedEvent?.Invoke(this, eventArgs);
+ ScrollAnimationEndEvent?.Invoke(this, eventArgs);
}
private void StopScroll()
{
Debug.WriteLineIf(LayoutDebugScrollableBase, "StopScroll Animation Playing");
scrollAnimation.Stop(Animation.EndActions.Cancel);
- OnScrollEnd();
+ OnScrollAnimationEnd();
}
scrollAnimation.Clear();
}
scrollAnimation.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOutSine);
scrollAnimation.AnimateTo(mScrollingChild, (ScrollingDirection == Direction.Horizontal) ? "PositionX" : "PositionY", axisPosition);
scrolling = true;
- OnScrollStart();
+ OnScrollAnimationStart();
scrollAnimation.Play();
}
}
maxScrollDistance = CalculateMaximumScrollDistance();
totalDisplacementForPan = 0.0f;
+ OnScrollDragStart();
}
else if (e.PanGesture.State == Gesture.StateType.Continuing)
{
float flickDisplacement = CalculateDisplacementFromVelocity(axisVelocity);
Debug.WriteLineIf(LayoutDebugScrollableBase, "FlickDisplacement:" + flickDisplacement + "TotalDisplacementForPan:" + totalDisplacementForPan);
+ OnScrollDragEnd();
if (flickDisplacement > 0 | flickDisplacement < 0)// Flick detected
{
private void ScrollAnimationFinished(object sender, EventArgs e)
{
scrolling = false;
- OnScrollEnd();
+ OnScrollAnimationEnd();
}
}