Java 类android.support.v7.widget.helper.ItemTouchHelper.Callback 实例源码
项目:letv
文件:ItemDragHelperCallback.java
public int getMovementFlags(RecyclerView recyclerView, ViewHolder viewHolder) {
int dragFlags;
LayoutManager manager = recyclerView.getLayoutManager();
if ((manager instanceof GridLayoutManager) || (manager instanceof StaggeredGridLayoutManager)) {
dragFlags = 15;
} else {
dragFlags = 3;
}
return Callback.makeMovementFlags(dragFlags, 0);
}