protected override void OnAttached()
        {
            var element = Element as ListView;

            if (Control is AWidget.ListView listView)
            {
                _dragListAdapter = new DragListAdapter(listView, element);
                listView.Adapter = _dragListAdapter;
                listView.SetOnDragListener(_dragListAdapter);
                listView.OnItemLongClickListener = _dragListAdapter;
            }
        }
Ejemplo n.º 2
0
        protected override void OnAttached()
        {
            var element = Element as ListView;

            if (Control is AWidget.ListView listView)
            {
                _longClickListenerOrig = listView.OnItemLongClickListener; //for later use to restore listener in OnDetached()

                _dragListAdapter = new DragListAdapter(listView, element);
                listView.Adapter = _dragListAdapter;
                listView.SetOnDragListener(_dragListAdapter);
                listView.OnItemLongClickListener = _dragListAdapter;
            }
        }