public void OnAnimationEnd(Animation animation) { if (_swipeRefreshLayout._refreshing) { // Make sure the progress view is fully visible _swipeRefreshLayout._progress.SetAlpha(MaxAlpha); _swipeRefreshLayout._progress.Start(); if (_swipeRefreshLayout._notify) { _swipeRefreshLayout._listener?.OnRefresh(); } } else { _swipeRefreshLayout._progress.Stop(); _swipeRefreshLayout._circleView.Visibility = ViewStates.Gone; _swipeRefreshLayout.SetColorViewAlpha(MaxAlpha); // Return the circle to its start position if (_swipeRefreshLayout._scale) { _swipeRefreshLayout.SetAnimationProgress(0 /* animation complete and view is hidden */); } else { _swipeRefreshLayout.SetTargetOffsetTopAndBottom( _swipeRefreshLayout.OriginalOffsetTop - _swipeRefreshLayout._currentTargetOffsetTop, true /* requires update */); } } _swipeRefreshLayout._currentTargetOffsetTop = _swipeRefreshLayout._circleView.Top; }
protected override void ApplyTransformation(float interpolatedTime, Transformation t) { var targetScale = _swipeRefreshLayout._startingScale + -_swipeRefreshLayout._startingScale * interpolatedTime; _swipeRefreshLayout.SetAnimationProgress(targetScale); _swipeRefreshLayout.MoveToStart(interpolatedTime); }
protected override void ApplyTransformation(float interpolatedTime, Transformation t) { _swipeRefreshLayout.SetAnimationProgress(1 - interpolatedTime); }