Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ViewPager" not found error when project migrated to AndroidX #46

Open
sanketthecoder opened this issue Mar 29, 2019 · 5 comments
Open

Comments

@sanketthecoder
Copy link

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

@vhontar
Copy link

vhontar commented May 13, 2019

Did you find any solution for this error?

@Kiaorra
Copy link

Kiaorra commented Jun 16, 2019

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

@Kunu003
Copy link

Kunu003 commented Jul 22, 2019

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"

@pzienowicz
Copy link

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

@Trinea
Copy link
Owner

Trinea commented Feb 16, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants