Пример #1
0
        void _recyclerView_Touch(object sender, TouchEventArgs e)
        {
            var ev = e.Event;
            MotionEventActions action = ev.Action & MotionEventActions.Mask;

            switch (action)
            {
            case MotionEventActions.Down:
                _startEventY  = ev.GetY();
                _heightChange = 0;
                Element.RaiseOnStartScroll();
                break;

            case MotionEventActions.Move:
                float delta = (ev.GetY() + _heightChange) - _startEventY;
                Element.RaiseOnScroll(delta, _recyclerView.GetVerticalScrollOffset());
                break;

            case MotionEventActions.Up:
                Element.RaiseOnStopScroll();
                break;
            }
            e.Handled = false;
        }
Пример #2
0
 public override void OnScrolled(RecyclerView recyclerView, int dx, int dy)
 {
     base.OnScrolled(recyclerView, dx, dy);
     _gridView.RaiseOnScroll(dy, _recyclerView.GetVerticalScrollOffset());
     //Console.WriteLine (">>>>>>>>> {0},{1}", dy, _recyclerView.GetVerticalScrollOffset ());
 }