bauerca / drag-sort-listview

Android ListView with drag and drop reordering.
3.2k stars 1.44k forks source link

If I use baseAdapter,which basic sentences should I add in 'DragSortListener.drop'? #157

Open jamesleekko opened 7 years ago

jamesleekko commented 7 years ago

For example, I use these codes in callback. I know it's not normative.. @override public void drop(int from, int to) { if (from != to) { AddingCardBean bean = mCards.get(from); mCards.remove(from); mCards.add(to,bean); mCardAdapter = new MyCardAdapter(DayManageActivity.this,mCards); mListView.setAdapter(mCardAdapter); mListView.moveCheckState(from,to); } }

After I drag a item, the item returns to its former position.