GitHub Issues Apache License 2.0 JitPack SlideActionView.apk (0.0.1 stable)




group Discord chat Telegram email E-mail

All Projects

SlideActionView is a simple widget that provides a nice slide-to-left/right interaction. This is a part of my efforts to modularize some of the things that I write; it was originally a part of Alarmio, and has been separated into its own library.

JitPack Build Status Discord

For testing and experimentation purposes, a sample apk can be downloaded here.

Sample App Use in Alarmio
img img



This project is published on JitPack, which you can add to your project by copying the following to your root build.gradle at the end of “repositories”.

allprojects {
  repositories {
    maven { url '' }

To add the dependency, copy this line into your app module’s build.gradle file.

implementation 'me.jfenn:SlideActionView:0.0.2'

Basic Use

Adding the SlideActionView somewhere in your layout is fairly simple. Here is an example:

  android:layout_gravity="bottom" />

You will then want to specify icons for the left/right “slides”. This can be done using the setLeftIcon and setRightIcon methods of the view. They accept both a Drawable and Bitmap, but it is more efficient to pass a Bitmap if possible.

SlideActionView actionView = findViewById(;

In order to listen for the swipe actions, you must implement the SlideActionListener interface.

actionView.setListener(new SlideActionView.SlideActionListener() {
  public void onSlideLeft() {
    // slid left
  public void onSlideRight() {
    // slid right


There are several methods that you can call to specify different colors. I will not go into great detail of what they do, but it should be fairly obvious. setTouchHandleColor changes the color of the touch handle. setOutlineColor affects the outlines. setIconColor changes the filter applied to both icons.

Last updated: