From c730426be01aca0ac01bc5df75f888f2c29e4955 Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Thu, 28 Jun 2018 15:29:13 +0200 Subject: [PATCH] Fixed dragging --- .../org/schabi/newpipe/settings/ChoseTabsFragment.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/ChoseTabsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/ChoseTabsFragment.java index 6953b4748..d779b410f 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ChoseTabsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ChoseTabsFragment.java @@ -176,7 +176,7 @@ public class ChoseTabsFragment extends Fragment { @Override public void onBindViewHolder(@NonNull ChoseTabsFragment.SelectedTabsAdapter.TabViewHolder holder, int position) { - holder.bind(position); + holder.bind(position, holder); } @Override @@ -200,8 +200,11 @@ public class ChoseTabsFragment extends Fragment { view = itemView; } - void bind(int position) { + void bind(int position, TabViewHolder holder) { handle.setImageResource(ThemeHelper.getIconByAttr(R.attr.drag_handle, getContext())); + handle.setOnTouchListener(getOnTouchListener(holder)); + + view.setOnLongClickListener(getOnLongClickListener(holder)); if(selectedTabs.get(position).startsWith("6\t")) { String channelInfo[] = selectedTabs.get(position).split("\t");