1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-24 17:10:33 +00:00

Fixed dragging

This commit is contained in:
Somethingweirdhere 2018-06-28 15:29:13 +02:00 committed by Christian Schabesberger
parent 57d6c97203
commit c730426be0

View File

@ -176,7 +176,7 @@ public class ChoseTabsFragment extends Fragment {
@Override @Override
public void onBindViewHolder(@NonNull ChoseTabsFragment.SelectedTabsAdapter.TabViewHolder holder, int position) { public void onBindViewHolder(@NonNull ChoseTabsFragment.SelectedTabsAdapter.TabViewHolder holder, int position) {
holder.bind(position); holder.bind(position, holder);
} }
@Override @Override
@ -200,8 +200,11 @@ public class ChoseTabsFragment extends Fragment {
view = itemView; view = itemView;
} }
void bind(int position) { void bind(int position, TabViewHolder holder) {
handle.setImageResource(ThemeHelper.getIconByAttr(R.attr.drag_handle, getContext())); handle.setImageResource(ThemeHelper.getIconByAttr(R.attr.drag_handle, getContext()));
handle.setOnTouchListener(getOnTouchListener(holder));
view.setOnLongClickListener(getOnLongClickListener(holder));
if(selectedTabs.get(position).startsWith("6\t")) { if(selectedTabs.get(position).startsWith("6\t")) {
String channelInfo[] = selectedTabs.get(position).split("\t"); String channelInfo[] = selectedTabs.get(position).split("\t");