1

I am using the https://github.com/emileb/DragSortRecycler to add drag and drop functionality to my app. When I add this in I am not able to scroll my recyclerView. What can be the problem?

rv = (RecyclerView)v.findViewById(R.id.rv);
    LinearLayoutManager llm = new LinearLayoutManager(getActivity());
    rv.setLayoutManager(llm);
    generatePaymentCards();
  adap = new PaymentRV_Adapter(cards);
    rv.setAdapter(adap);
    rv.setItemAnimator(null);



    DragSortRecycler dragSortRecycler = new DragSortRecycler();
    dragSortRecycler.setViewHandleId(R.id.card_view); //View you wis
    dragSortRecycler.setOnItemMovedListener(new DragSortRecycler.OnItemMovedListener() {
        @Override
        public void onItemMoved(int from, int to) {
            Log.d("", "onItemMoved " + from + " to " + to);


        }
    });

    rv.addItemDecoration(dragSortRecycler);
    rv.addOnItemTouchListener(dragSortRecycler);
sara roberts
  • 63
  • 1
  • 1
  • 11

0 Answers0