Fixed dragging

This commit is contained in:
Somethingweirdhere 2018-06-28 15:29:13 +02:00 committed by Christian Schabesberger
parent 57d6c97203
commit c730426be0
1 changed files with 5 additions and 2 deletions

View File

@ -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");