GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - leochuan/ViewPagerLayoutManager: ViewPager like LayoutManager which supports some awesome animations and infinite scroll.

This repository was archived by the owner on Dec 8, 2020. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

122 Commits
122 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
gradle/wrapper
gradle/wrapper
 
 
static
static
 
 
viewpagerlayoutmanager
viewpagerlayoutmanager
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
README_ZH.md
README_ZH.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

ViewPager-LayoutManager Download build

English | 中文

logo

VPLM is a ViewPager like LayoutManager which implements some common animations. If you need some other effects feel free to raise an issue or PR.

circle circle_scale carousel gallery rotate scale

Customzie

customize

Each layoutmanager has bunch of different properties to customize.

Such as:

  • radius
  • scroll speed
  • space
  • orientation

Run the demo to see more details.

Infinite Scroll

infinite

Auto Center

You can make the target view stop right at center every time you swipe or drag by:

// work exactly same as LinearSnapHelper.
new CenterSnapHelper().attachToRecyclerView(recyclerView);

Set Max Visible Item Count

layoutmanager.setMaxVisibleItemCount(count);

Get Position Of Center Item

layoutmanager.getCurrentPosition()

Smooth Scroll To Position

Normally you can just use RecyclerView's SmoothScrollToPosition method, but when infinite scroll enabled, using method below to avoid some unexpected errors.

ScrollHelper.smoothScrollToTargetView(recyclerView, itemViewYouWantScrollTo);

Auto Play

You can make it auto play by using AutoPlayRecyclerView

<com.leochuan.AutoPlayRecyclerView
    android:id="@+id/recycler"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:direction="right"
    app:timeInterval="1500"/>

Download

Gradle:

repositories {
  jcenter()
}

dependencies {
  compile 'rouchuan.viewpagerlayoutmanager:viewpagerlayoutmanager:2.x.y'
}

Maven:

<dependency>
  <groupId>rouchuan.viewpagerlayoutmanager</groupId>
  <artifactId>viewpagerlayoutmanager</artifactId>
  <version>2.x.y</version>
  <type>pom</type>
</dependency>

Quick Start

Make sure that each item has the same size, or something unpredictable may happen.

You can warm up your layoutmanager by Builder.

new CircleLayoutManager.Builder(context)
                .setAngleInterval(mAngle)
                .setMaxRemoveAngle(mMaxRemoveAngle)
                .setMinRemoveAngle(mMinRemoveAngle)
                .setMoveSpeed(mSpeed)
                .setRadius(mRadius)
                .setReverseLayout(true)
                .build();

Or just simply call the construct.

new CircleLayoutManager(context);

License

Apache-2.0. See LICENSE file for detail

About

ViewPager like LayoutManager which supports some awesome animations and infinite scroll.

Resources

Readme
Apache-2.0 license
Activity

Stars

1.7k stars

Watchers

1 watching

Forks

323 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.