use of javen.example.com.commonlibrary.utils.ItemDragHelperCallback in project SmartNews by JavenLu.
the class NewsChannelActivity method initItemDragHelper.
private void initItemDragHelper() {
ItemDragHelperCallback itemDragHelperCallback = new ItemDragHelperCallback(newsMineAdapter);
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(itemDragHelperCallback);
itemTouchHelper.attachToRecyclerView(mineRecyclerView);
newsMineAdapter.newsChannelDelegate.setOnLongPressClickListener(position -> {
newsMineAdapter.setLongPressEnable(itemDragHelperCallback, position);
});
}
Aggregations