lsjwzh / RecyclerViewPager

Deprecated
Apache License 2.0
3.53k stars 667 forks source link

How to use when migrate to AndroidX? #227

Closed mrminhhuy closed 5 years ago

mrminhhuy commented 5 years ago

My profile show error: java.lang.IllegalAccessError: Field 'androidx.recyclerview.widget.RecyclerView$ViewHolder.mPosition' is inaccessible to class 'androidx.appcompat.widget.ViewHolderDelegate' (declaration of 'androidx.appcompat.widget.ViewHolderDelegate'

bctpl commented 5 years ago

did you can please tell me solution?

mrminhhuy commented 5 years ago

Hi, You can pref my fork. I was migrate to androidX. See here: https://github.com/huyvm/RecyclerViewPager

bctpl commented 5 years ago

@huyvm In My lib I can't get ViewHolderDelegate using import androidx.recyclerview.widget.ViewHolderDelegate; so please tell me how to get that .. and thanks for fast reply

mrminhhuy commented 5 years ago

Hi @bctpl, remove old implement and add my RecyclerViewPager (read ReadMe).

bctpl commented 5 years ago

I don't have any old implementation of that library I downloaded and migrate into androidx that's it and I have all that library implementation but still can't resolve that and ViewHolderDelegate it's declaration also not in androidx.recyclerview.widget when i dig into library

bctpl commented 5 years ago

@huyvm Your repo work but how you do that please let me explain if possible why I can't get ViewHolderDelegate in my implement ?

mrminhhuy commented 5 years ago

Hi, because RecyclerViewPaper in your implement don't support migrate to AndroidX.

bctpl commented 5 years ago

Your forked implementation worked perfectly thanks for that. But still confused why RecyclerViewPaper in your implement don't support migrate to AndroidX. not working. Anyway thanks for helping ☺

mrminhhuy commented 5 years ago

Hi, because https://github.com/lsjwzh/RecyclerViewPager don't yet convert repos to androidX. So when you use with implement from lsjwzh/RecyclerViewPager, you will see error.