Voltar ao ranking

Devlight/InfiniteCycleViewPager

Java

Infinite cycle ViewPager with two-way orientation and interactive effect.

infinite-scrollviewpagercardsandroidlibraryuidevlightcycle
Crescimento de estrelas
Estrelas
5.7k
Forks
821
Crescimento semanal
Issues
56
2k3k4k5k
ago. de 2016nov. de 2019mar. de 2023jul. de 2026
ArtefatosMavengit clone https://github.com/Devlight/InfiniteCycleViewPager.git
README

Devlight


InfiniteCycleViewPager

Infinite cycle ViewPager with two-way orientation and interactive effect.

Android Arsenal       Android       Download       License       Codacy


 

U can check the sample app here.

Warn

This library is not more supported. 
If you want to add new feature or fix a bug, grab source code and do it. 
If you think your fix or feature would be useful to other developers, 
I can add link of your repository to this README file. 
Thank you for using our libraries.

Download

You can download a .aar from GitHub's releases page.

Or use Gradle:

compile 'com.github.devlight:infinitecycleviewpager:1.0.2'

Or Maven:

<dependency>
  <groupId>com.github.devlight</groupId>
  <artifactId>infinitecycleviewpager</artifactId>
  <version>1.0.2</version>
  <type>pom</type>
</dependency>

Or Ivy:

<dependency org='com.github.devlight' name='infinitecycleviewpager' rev='1.0.2'>
  <artifact name='$AID' ext='pom'></artifact>
</dependency>

Android SDK Version

InfiniteCycleViewPager requires a minimum SDK version of 11.

Sample

Parameters

For InfiniteCycleViewPager you can set such parameters as:

  • min scale:
    allows you to set the minimum scale of left and right bottom pages.

  • max scale:
    allows you to set the maximum scale of center top page.

  • min scale offset:
    allows you to set offset from edge to minimum scaled pages.

  • center scale offset:
    allows you to set offset from center when two pages appears.

  • model selected icon:
    allows you to set selected icon when current model is active.

  • medium scaled:
    allows you to set is scaling would be min -> max or min -> medium -> max.

  • scroll duration:
    allows you to set snap scrolling duration.

  • scroll interpolator:
    allows you to set snap scrolling interpolator.

  • page transform listener:
    allows you to set page transform listener.

  • auto scroll:
    allows you to set auto scroll in positive and negative directions.

Tips

Two-way widget need a lot of memory.
Infinite scroll available when item count more then 2.
You can set vertical or horizontal infinite cycle ViewPager.

Init

Check out in code init:

//      final VerticalInfiniteCycleViewPager infiniteCycleViewPager =
//                (VerticalInfiniteCycleViewPager) view.findViewById(R.id.vicvp);
        final HorizontalInfiniteCycleViewPager infiniteCycleViewPager =
                (HorizontalInfiniteCycleViewPager) view.findViewById(R.id.hicvp);
        infiniteCycleViewPager.setAdapter(...);
        infiniteCycleViewPager.setScrollDuration(500);
        infiniteCycleViewPager.setInterpolator(...);
        infiniteCycleViewPager.setMediumScaled(true);
        infiniteCycleViewPager.setMaxPageScale(0.8F);
        infiniteCycleViewPager.setMinPageScale(0.5F);
        infiniteCycleViewPager.setCenterPageScaleOffset(30.0F);
        infiniteCycleViewPager.setMinPageScaleOffset(5.0F);
        infiniteCycleViewPager.setOnInfiniteCyclePageTransformListener(...);

If you want to get item position just call this method:

infiniteCycleViewPager.getRealItem();

To update your ViewPager after some adapter update or else, you can call this method:

infiniteCycleViewPager.notifyDataSetChanged();

If you want to start auto scroll or stop call this methods:

// true - positive
// false - negative
infiniteCycleViewPager.startAutoScroll(...);
infiniteCycleViewPager.stopAutoScroll();

Other methods check out in sample.

And XML init:


<!--<com.gigamole.infinitecycleviewpager.VerticalInfiniteCycleViewPager-->
<com.gigamole.infinitecycleviewpager.HorizontalInfiniteCycleViewPager
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:icvp_interpolator="..."
    app:icvp_center_page_scale_offset="30dp"
    app:icvp_max_page_scale="0.8"
    app:icvp_medium_scaled="true"
    app:icvp_min_page_scale="0.5"
    app:icvp_min_page_scale_offset="5dp"
    app:icvp_scroll_duration="500"/>

Getting Help

To report a specific problem or feature request, open a new issue on Github.

Xamarin

Thanks to Martijn van Dijk for developing Xamarin bindings library for InfiniteCycleViewPager.
Plugin is available on Nuget.

Credits

Yehor Kosinov Prakhar Neel Sharma

Author

Created by Basil Miller - @gigamole

Company

Facebook     Twitter     LinkedIn

Here you can see open source work developed by Devlight LLC.
This and another works is an exclusive property of Devlight LLC.

If you want to use this library in applications which will be available on Google Play, please report us about it or author of the library.

Whether you're searching for a new partner or trusted team for creating your new great product we are always ready to start work with you.

You can contact us via info@devlight.io or opensource@devlight.io.
Thanks in advance.

Devlight LLC, 2016
devlight.io

Repositórios relacionados
meliorence/react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.

JavaScriptnpmBSD 3-Clause "New" or "Revised" Licensecarouselswiper
10.5k2.3k
WenchaoD/FSPagerView

FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders.

SwiftMIT Licenseswiftobjective-c
7.4k1.1k
tangbc/vue-virtual-scroll-list

⚡️A vue component support big amount data list with high render performance and efficient.

JavaScriptnpmMIT Licensevirtual-listbig-data
tangbc.github.io/vue-virtual-scroll-list
4.5k596
hoothin/UserScripts

Greasemonkey scripts ( Pagetual / Picviewer CE+ / DownloadAllContent ) 油猴腳本集 ユーザースクリプト集

JavaScriptnpmauto-scrollautopager
greasyfork.org/users/8227-hoothin
4.2k589
clauderic/react-infinite-calendar

✨ Infinite scrolling date-picker built with React, with localization, range selection, themes, keyboard support, and more.

JavaScriptnpmMIT Licensereactcalendar
clauderic.github.io/react-infinite-calendar/
4k401
inokawa/virtua

A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.

TypeScriptnpmMIT Licenseinfinite-scrollperformance
inokawa.github.io/virtua/
3.6k110
setchi/FancyScrollView

A versatile Unity scroll view component that enables highly flexible animations.

C#MIT Licenseunityunity3d
deepwiki.com/setchi/FancyScrollView
3.5k431
dohooo/react-native-reanimated-carousel

🎠 React Native swiper/carousel component, fully implemented using reanimated v2, support to iOS/Android/Web. (Swiper/Carousel)

TypeScriptnpmMIT Licensereact-nativecarousel
react-native-reanimated-carousel.vercel.app
3.4k351
ankeetmaini/react-infinite-scroll-component

An awesome Infinite Scroll component in react.

TypeScriptnpmMIT Licensereactinfinite-scroll
react-infinite-scroll-component.netlify.com
3.1k333
fairygui/FairyGUI-unity

A flexible UI framework for Unity

C#MIT Licenseunity3dunity3d-plugin
fairygui.com
3k669
mypaint/mypaint

MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.

PythonPyPIGNU General Public License v2.0paintingdrawing
mypaint.app
3k448
eggswift/pull-to-refresh

#Busy Re-Building....# An easy way to use pull to refresh and infinite scrolling in Swift. Pod 'ESPullToRefresh'

SwiftMIT Licenserefresherpull-to-refresh
1.8k255