xabaras/RecyclerViewSwipeDecorator

androidX compatibility ??

Closed this issue · 5 comments

The SwipeDecorator.Builder() method takes Recyclerview and ViewHolder as arguments but they are not compatible with android x versions.
Any idea to do???

Just working on it, hope to release a new version soon

For me replacing
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;

with
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView;

worked fine

For me replacing
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.helper.ItemTouchHelper;

with
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView;

worked fine

Hi, may I know whr to change this? I tried in the TouchHelper class but it still doesn't work.

Hi, may I know whr to change this? I tried in the TouchHelper class but it still doesn't work.

I've just copied and pasted library code in my project, and IDE made all imports automatically (and translate code to Kotlin in my case) in AndroidX based project ;)

Thank you all for your contribution.
Version 1.3 (#17) solves the issue.