pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/chadguo/VerticalViewPager

crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-b69241e157469407.css" /> GitHub - chadguo/VerticalViewPager: A vertical scroll ViewPager implementation. Use with scrollable views(ListView, ScrollView, RecyclerView). · GitHub
Skip to content

chadguo/VerticalViewPager

Repository files navigation

VerticalViewPager

license default

A vertical scrollable ViewPager implementation.Works well with RecyclerView and ListView, currently not support TextView or ImageView as child directly, but you can put everything into RecyclerView and ListView.

In the latest work, we need a vertical scrollable ViewPager, and Android ViewPager only support horizontal scroll, there are already some work such as kaelaela/VerticalViewPager and DragScrollDetailsLayout, but they are not meet our conditions. So I figure out an implementation and build this project.

We use this on WeChat Canvas Ads.

Screenshots

default default

How does it work?

Use ViewPager's fake drag feature and View.OnTouchListener to manage the touch event.

Implementation:

  • DummyViewPager override the onInterceptTouchEvent method and return false, dispatch touch events to it's children;
  • Set VerticalVPOnTouchListener as the View.OnTouchListener of the child view (RecyclyerView\ListVeiw...), VerticalVPOnTouchListener manages the child view's scroll and fake the ViewPager's scroll;
  • Read the source code.

I build my project based on kaelaela/VerticalViewPager, but we use completely different implementations.

Next:

  • Support TextView/ImageView as child directly;
  • Add more examples;

Me

Chad Guo

License

Please LICENSE.

Please let me know if you use this project, tks.

About

A vertical scroll ViewPager implementation. Use with scrollable views(ListView, ScrollView, RecyclerView).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy