1.1.1 (Aug 29, 2021)
May 20, 2021
Feb 8, 2022 (Retired)
Joseph James (iamjosephmj)
Joseph James (iamjosephmj)
Source code


Flinger (Only compatible with compose)

What is Flinger?

Flinger is a plugin that is made on top of jetpack compose that will help the developer to tweak the LazyList's fling behaviour. This Library will help the developers to change the fling behaviours much easier without digging deep. Here is a prototype of Flinger:


Add the following to your project's root build.gradle file

repositories {
    maven {
        url "https://jitpack.io"

Add the following to your project's build.gradle file

dependencies {
    implementation 'com.github.iamjosephmj:Flinger:1.1.1'


By the launch of Jetpack compose at least some of you might have thought if did they port the old scroll behaviour to it. The answer to that is YES, they had ported the old Overscroller behaviour to the latest compose. The Overscroller is the component that is responsible for flings in ScrollView/RecyclerViews in Android. If we dig deeper into the implementation of the Overscroller, you can see that Android uses a fixed set of values so that the flings will look almost similar throughout different devices. The whole idea behind the creation of this library is that the developers will have full access to all the internal parameters that governs the fling behaviour. This library can be easily integrated with the LazyColumns , LazyRows , LazyLists that is provided by compose.


Refer to the Sample project under to get more insights about the implementation.

    flingBehavior = flingBehavior(

             * This variable manages the friction to the scrolls in the LazyColumn

             * This is the absolute value of a velocity threshold, below which the
             * animation is considered finished.

             * Gravitational obstruction to the scroll.

             * Scroll Inches per meter

             * Rate of deceleration of the scrollView.
            .decelerationRate((ln(0.78) / ln(0.9)).toFloat())

             * Friction at the time of deceleration.

             * Inflection is the place where the start and end tension lines cross each other.

             * Spline's start tension.

             * Spline's end tension.

             * number of sampling points in the spline

            // builder pattern.
    // Columns/Rows

Stock Behaviours

If you are not comfortable with tweaking values, we provide you some pre-defined methods that can be used to bring the behaviour to your project, you can refer to StockFlingBehaviours.kt

Custom Behaviours

If you are interested in designing your own behaviours for the Flings, you can tryout different possibilities in the Flinger app

Contribution, Issues or Future Ideas

If part of Flinger is not working correctly be sure to file a Github issue. In the issue provide as many details as possible. This could include example code or the exact steps that you did so that everyone can reproduce the issue. Sample projects are always the best way :). This makes it easy for our developers or someone from the open-source community to start working!

If you have a feature idea submit an issue with a feature request or submit a pull request and we will work with you to merge it in!

Contribution guidelines

Contributions are more than welcome!

  • You should make sure that all the test are working properly.
  • You should raise a PR to develop branch
  • Anyone can contribute fling behaviours to StockFlingBehaviours.kt .
  • Before you raise a PR please make sure your code had no issue from Android studio lint analyzer.

Please Share & Star the repository to keep me motivated.