### Initialize InfiniteCycleViewPager in Java
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
Example of initializing and configuring `HorizontalInfiniteCycleViewPager` or `VerticalInfiniteCycleViewPager` in Java, setting various parameters like scroll duration, interpolator, page scales, and offsets.
```Java
// 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(...);
```
--------------------------------
### Get Current Item Position in InfiniteCycleViewPager
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
Call this method on an `InfiniteCycleViewPager` instance to retrieve the real position of the currently displayed item.
```Java
infiniteCycleViewPager.getRealItem();
```
--------------------------------
### Control Auto-Scrolling for InfiniteCycleViewPager in Java
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
This Java snippet demonstrates how to programmatically start and stop the auto-scrolling feature of the `InfiniteCycleViewPager`. The `startAutoScroll` method can take a boolean parameter to control the scroll direction (true for positive, false for negative).
```java
// true - positive
// false - negative
infiniteCycleViewPager.startAutoScroll(...);
infiniteCycleViewPager.stopAutoScroll();
```
--------------------------------
### InfiniteCycleViewPager Configurable Parameters
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
Overview of the key parameters that can be configured for `InfiniteCycleViewPager` to control its appearance and behavior.
```APIDOC
InfiniteCycleViewPager Parameters:
- min scale: Allows setting the minimum scale of left and right bottom pages.
- max scale: Allows setting the maximum scale of the center top page.
- min scale offset: Allows setting the offset from the edge to minimum scaled pages.
- center scale offset: Allows setting the offset from the center when two pages appear.
- model selected icon: Allows setting the selected icon when the current model is active.
- medium scaled: Allows setting if scaling would be min -> max or min -> medium -> max.
- scroll duration: Allows setting the snap scrolling duration.
- scroll interpolator: Allows setting the snap scrolling interpolator.
- page transform listener: Allows setting the page transform listener.
- auto scroll: Allows setting auto scroll in positive and negative directions.
```
--------------------------------
### Add InfiniteCycleViewPager Dependency with Gradle
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
Add this line to your `build.gradle` file to include the InfiniteCycleViewPager library using Gradle.
```Groovy
compile 'com.github.devlight:infinitecycleviewpager:1.0.2'
```
--------------------------------
### Add InfiniteCycleViewPager Dependency with Maven
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
Include the InfiniteCycleViewPager library in your project's `pom.xml` file using Maven.
```Groovy
com.github.devlight
infinitecycleviewpager
1.0.2
pom
```
--------------------------------
### Add InfiniteCycleViewPager Dependency with Ivy
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
Add this dependency to your Ivy configuration file to include the InfiniteCycleViewPager library.
```Groovy
```
--------------------------------
### Initialize HorizontalInfiniteCycleViewPager in XML Layout
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
This XML snippet shows how to declare and configure a `HorizontalInfiniteCycleViewPager` within an Android layout. It includes various custom attributes (`app:icvp_...`) to control its appearance and behavior, such as page scaling, scroll duration, and interpolator.
```xml
```
--------------------------------
### Update InfiniteCycleViewPager After Data Change
Source: https://github.com/devlight/infinitecycleviewpager/blob/master/README.md
Use this method to refresh the `InfiniteCycleViewPager` after its adapter data has been updated or other changes require a redraw.
```Java
infiniteCycleViewPager.notifyDataSetChanged();
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.