Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kibotu/parallaxscrollingview

Parallax scrolling either by offset or automatically.
https://github.com/kibotu/parallaxscrollingview

acceleratered android gpu hacktoberfest hacktoberfest2023 kotlin parallax scrolling viewpager viewpager2

Last synced: about 1 month ago
JSON representation

Parallax scrolling either by offset or automatically.

Awesome Lists containing this project

README

        

[![Donation](https://img.shields.io/badge/buy%20me%20a%20coffee-brightgreen.svg)](https://www.paypal.me/janrabe/5) [![About Jan Rabe](https://img.shields.io/badge/about-me-green.svg)](https://about.me/janrabe)
# ParallaxScrollingView [![](https://jitpack.io/v/kibotu/ParallaxScrollingView.svg)](https://jitpack.io/#kibotu/ParallaxScrollingView) [![](https://jitpack.io/v/kibotu/ParallaxScrollingView/month.svg)](https://jitpack.io/#kibotu/ParallaxScrollingView) [![Hits-of-Code](https://hitsofcode.com/github/kibotu/ParallaxScrollingView)](https://hitsofcode.com/view/github/kibotu/ParallaxScrollingView) [![Javadoc](https://img.shields.io/badge/javadoc-SNAPSHOT-green.svg)](https://jitpack.io/com/github/kibotu/ParallaxScrollingView/master-SNAPSHOT/javadoc/index.html) [![Build Status](https://travis-ci.org/kibotu/ParallaxScrollingView.svg)](https://travis-ci.org/kibotu/ParallaxScrollingView) [![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=15) [![Gradle Version](https://img.shields.io/badge/gradle-5.6.1-green.svg)](https://docs.gradle.org/current/release-notes) [![Kotlin](https://img.shields.io/badge/kotlin-1.3.50-green.svg)](https://kotlinlang.org/) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/kibotu/ParallaxScrollingView/master/LICENSE) [![androidx](https://img.shields.io/badge/androidx-brightgreen.svg)](https://developer.android.com/topic/libraries/support-library/refactor)

Parallax Scrolling View.

- automatic scrolling with different speeds
- minimal integration
- gpu accelerated
- supports vector drawables
- supports bitmap drawables
- supports ViewPager2
- argb interpolated gradient on viewpager scrolling
- updates statusBar color on scroll

[![Screenshot](https://github.com/kibotu/ParallaxScrollingView/raw/master/sample_big.gif)](https://github.com/kibotu/ParallaxScrollingView/raw/master/sample_big.gif)

### How to use

1 add ParallaxScrollingView to [your layout](app/src/main/res/layout/activity_main.xml#L21-L82)

```xml

```

2 (Optional) add [ParallaxScrollingViewOnPageScrollListener](app/src/main/java/net/kibotu/parallaxscrollingview/demo/MainActivity.kt#L28)) to ViewPager2

```kotlin
viewPager.registerOnPageChangeCallback(ParallaxScrollingViewOnPageScrollListener(listOf(wave1, wave2, wave3, wave4, wave5, wave6), 2f))
```

3(Optional) add [OffsetOnPageScrollListener](app/src/main/java/net/kibotu/parallaxscrollingview/demo/MainActivity.kt#L30) to ViewPager2

```kotlin
viewPager.registerOnPageChangeCallback(OffsetOnPageScrollListener(this, root, items.indices.map { backgrounds[it] }, true))
```

### How to install

```groovy
repositories {
maven {
url "https://jitpack.io"
}
}

dependencies {
implementation 'com.github.kibotu:ParallaxScrollingView:-SNAPSHOT'
}
```

### Notes

Follow me on Twitter: [@wolkenschauer](https://twitter.com/wolkenschauer)

Let me know what you think: [[email protected]](mailto:[email protected])

Contributions welcome!

### License


Copyright 2019 Jan Rabe

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.