예제 #1
0
 public void OnAnimationEnd(Animation animation)
 {
     if (swipeRefreshLayout.mRefreshing)
     {
         // Make sure the progress view is fully visible
         swipeRefreshLayout.mProgress.SetAlpha(MAX_ALPHA);
         swipeRefreshLayout.mProgress.Start();
         if (swipeRefreshLayout.mNotify)
         {
             if (swipeRefreshLayout.mListener != null)
             {
                 swipeRefreshLayout.mListener.onRefresh();
             }
         }
     }
     else
     {
         swipeRefreshLayout.mProgress.Stop();
         swipeRefreshLayout.mCircleView.Visibility = ViewStates.Gone;
         swipeRefreshLayout.setColorViewAlpha(MAX_ALPHA);
         // Return the circle to its start position
         if (swipeRefreshLayout.mScale)
         {
             swipeRefreshLayout.setAnimationProgress(0 /* animation complete and view is hidden */);
         }
         else
         {
             swipeRefreshLayout.setTargetOffsetTopAndBottom(swipeRefreshLayout.mOriginalOffsetTop - swipeRefreshLayout.mCurrentTargetOffsetTop,
                                                            true /* requires update */);
         }
     }
     swipeRefreshLayout.mCurrentTargetOffsetTop = swipeRefreshLayout.mCircleView.Top;
 }
예제 #2
0
            protected override void ApplyTransformation(float interpolatedTime, Transformation t)
            {
                float targetScale = (swipeRefreshLayout.mStartingScale + (-swipeRefreshLayout.mStartingScale * interpolatedTime));

                swipeRefreshLayout.setAnimationProgress(targetScale);
                swipeRefreshLayout.moveToStart(interpolatedTime);
            }
예제 #3
0
 protected override void ApplyTransformation(float interpolatedTime, Transformation t)
 {
     swipeRefreshLayout.setAnimationProgress(1 - interpolatedTime);
 }