Error including Android-DirectionalViewPager .jar in Eclipse

后端 未结 3 1687
南方客
南方客 2020-12-01 08:36

I am trying to implement vertical swiping in my app. (Its just like the swiping with ViewPager, but vertically).

I found Jake Whartons library Android-DirectionalVie

相关标签:
3条回答
  • 2020-12-01 09:14

    I was facing many issues when integrating the old Jake Wharton project which was archived. I came along this github project and it was properly integrating with the newest app compat/support version. Hope it helps someone. Vertical as well as horizontal view pager swipe

    0 讨论(0)
  • 2020-12-01 09:15

    Update (Feb 1st 14): This library is a really good alternative. I'm currently using it in my project and it's working flawlessly. It's still being maintained and it's a very close modification of the standard ViewPager from support lib r19. Another advantage is, that you can easily integrate and resolve it via maven central, if you're using gradle.

    https://github.com/castorflex/VerticalViewPager


    Thanks to Oleg Vaskevich, I was able to compile a new and working directionalViewpager jar-file from the current git files and oleg's additions/fixes. I can confirm that it's working with the current support-lib v4 r11.

    https://dl.dropbox.com/u/24363935/android-directionalviewpager-1.2.1fixed.jar

    hopefully this will be useful to somebody :)

    to add: I had an IllegalArgumentException in DirectionalViewPager.setAdapter(PagerAdapter adapter){...};. So I've modified and fixed, recompiled and uploaded the new jar.

    0 讨论(0)
  • 2020-12-01 09:19

    DVP is deprecated by the developer due to significant changes to ViewPager since. However, that doesn't mean there is no use for it.

    Try downloading the source directly and including the two source files within your project. If you're using the latest support/compatibility library you will need to use android.database.DataSetObserver instead of ViewPager.DataSetObserver. Hope this helps!

    Modified code that should work: https://dl.dropbox.com/u/21007282/Code/DirectionalViewPager-works.zip

    0 讨论(0)
提交回复
热议问题