android-auto-scroll-view-pager
android-auto-scroll-view-pager copied to clipboard
"ViewPager" not found error when project migrated to AndroidX
When I migrated my project to AndroidX it seems that "ViewPager" is not correctly referenced. When I separately try to create a ViewPager it's being referenced from "androidx.viewpager.widget", whereas in your library it is still referred from the support library as it pertains to the normal libraries and not AndroidX. Please provide an update or atleast a fix for this ASAP.
Did you find any solution for this error?
This is a problem that can be solved simply by changing the "import android.support.v4.view.ViewPager" to "import androidx.viewpager.widget.ViewPager". And "import android.support.v4.view.PagerAdapter" to "import androidx.viewpager.widget.PagerAdapter".
If you are still facing the same issue then instead of implementing the library just copy AutoScrollViewPager.java, CustomDurationScroller.java classes, and change the below imports of AutoScrollViewPager.java "import android.support.v4.view.ViewPager" to "import androidx.viewpager.widget.ViewPager" "import android.support.v4.view.PagerAdapter" to "import androidx.viewpager.widget.PagerAdapter"
I've created kotlin version of this library and there AndroidX is supported. Feel free to use it: https://github.com/pzienowicz/androidx-auto-scroll-view-pager
I've created kotlin version of this library and there AndroidX is supported. Feel free to use it: https://github.com/pzienowicz/androidx-auto-scroll-view-pager
@pzienowicz Thanks for giving it a new life. I have linked to your library url in ReadMe