android-auto-scroll-view-pager icon indicating copy to clipboard operation
android-auto-scroll-view-pager copied to clipboard

"ViewPager" not found error when project migrated to AndroidX

Open sanketthecoder opened this issue 5 years ago • 5 comments

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.

Screenshot 2019-03-29 at 1 18 29 PM

sanketthecoder avatar Mar 29 '19 07:03 sanketthecoder

Did you find any solution for this error?

vhontar avatar May 13 '19 07:05 vhontar

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".

Kiaorra avatar Jun 16 '19 06:06 Kiaorra

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"

Kunu003 avatar Jul 22 '19 14:07 Kunu003

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 avatar Sep 27 '19 17:09 pzienowicz

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

Trinea avatar Feb 16 '20 14:02 Trinea