Need help with Flick?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

456 Stars 20 Forks Apache License 2.0 83 Commits 1 Opened issues


Flick dismiss all the things!

Services available


Need anything else?

Contributors list

# 32,876
73 commits
# 4,283
3 commits
# 30,663
1 commit


Flick in action

Flick is a tiny library for flick dismissing images (or anything actually). You can read the announcement blog post to learn how Flick was created.

implementation 'me.saket:flick:1.7.0'


The sample project contains best practices for using Flick. You can download its APK from here for trying it out on your phone.


Flick requires you to manually provide the content dimensions instead of it relying on the content View's dimensions. This is useful for scalable

, where the height will always be set to match-parent, but the actual image may or may not be consuming the entire space.
val callbacks = object : FlickCallbacks {
  override fun onMove(@FloatRange(from = -1.0, to = 1.0) moveRatio: Float) {
    // The content is being moved around. Updating the
    // background dimming is a good usecase for this callback.

override fun onFlickDismiss(animationDuration: Long) { // The content was been flicked and the Activity should // be dismissed once the flick animation is complete. flickDismissLayout.postDelayed({ finish() }, animationDuration) } } val contentSizeProvider = ContentSizeProvider2 { imageView.zoomedImageHeight() }, flickDismissLayout.gestureListener = FlickGestureListener(context, contentSizeProvider, callbacks)

Intercepting flicks

For usecases where the content can be scrolled further in the direction of the gesture, Flick exposes a way for intercepting flick detection,

// Block flick gestures if the image can pan further.
gestureListener.gestureInterceptor = { scrollY ->
  val isScrollingUpwards = scrollY < 0
  val directionInt = if (isScrollingUpwards) -1 else +1
  val canPanFurther = imageView.canScrollVertically(directionInt)

when { canPanFurther -> InterceptResult.INTERCEPTED else -> InterceptResult.IGNORED } }


Copyright 2019 Saket Narayan.

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

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.