I am following this tutorial: https://www.youtube.com/watch?v=VQwZQz9qsDA but when I have to do the activity_main I do it as is:
<vpv.iso.com.viewpagervertical.VerticalViewPager
android:id="@id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
but it gives me the following error
Caused by that, I don't know how to make the vertical slider work anymore, it just fails me there. I think it also has to do with the fact that at the start of the video he has 2 folders created with that name and I don't, and that I have created an xml called pager.xml that only has the following:
<resources>
<item
type="id"
name="pager" />
</resources>
The problem indicates that you are trying to create the view:
but the class
VerticalViewPager
does not exist in the indicated package (vpv.iso.com.viewpagervertical.
) in your project. The view that you add to your layout must be created via code.I suggest you use for example this class in your project:
https://android.googlesource.com/platform/packages/apps/DeskClock/+/master/src/com/android/deskclock/VerticalViewPager.java
Check this example:
https://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-with-different-fragments-layouts/46825489#46825489