Fix reordering playlist items on grid layout
This commit is contained in:
parent
ee4942dfd7
commit
b1a5547de2
1 changed files with 5 additions and 1 deletions
|
@ -459,7 +459,11 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
||||||
|
|
||||||
|
|
||||||
private ItemTouchHelper.SimpleCallback getItemTouchCallback() {
|
private ItemTouchHelper.SimpleCallback getItemTouchCallback() {
|
||||||
return new ItemTouchHelper.SimpleCallback(ItemTouchHelper.UP | ItemTouchHelper.DOWN,
|
int directions = ItemTouchHelper.UP | ItemTouchHelper.DOWN;
|
||||||
|
if (isGridLayout()) {
|
||||||
|
directions |= ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT;
|
||||||
|
}
|
||||||
|
return new ItemTouchHelper.SimpleCallback(directions,
|
||||||
ItemTouchHelper.ACTION_STATE_IDLE) {
|
ItemTouchHelper.ACTION_STATE_IDLE) {
|
||||||
@Override
|
@Override
|
||||||
public int interpolateOutOfBoundsScroll(RecyclerView recyclerView, int viewSize,
|
public int interpolateOutOfBoundsScroll(RecyclerView recyclerView, int viewSize,
|
||||||
|
|
Loading…
Reference in a new issue