GithubHelp home page GithubHelp logo

slidebutton's Introduction

SlideButton

A simple, elegant and customizable library for implementing the swipe button. Just add this library in your build.gradle and use the SlideButton view to use the slide view. (Scroll down for Screenshots.)

Importing the library

  • Add the jitpack url in your root build.gradle at the end of repositories:

    allprojects {
        repositories {
            maven { url "https://www.jitpack.io" }
        }
    }
    
  • Add the dependency

 dependencies {
     compile 'com.github.masterlittle:SlideButton:1.1'
   }

There is a simple sample included in the code to help you jumpstart. Cheers!!

#What all can you customize?

  • app:gradient_color_1 = Set the primary color of the Slide button.
  • app:gradient_color_2 = Set the secondary color of the Slide button.
  • app:gradient_color_3 = Set the tertiary color of the Slide button.
  • app:gradient_color_2_width = Set the width of the secondary color.
  • app:after_confirmation_background = The background to be shown after the button has been swiped.
  • app:button_swipe_text = Set the text to be shown while swiping.
  • app:threshold = The threshold to be crossed before a successful swipe is registered. This is between 0 and 1. Higher the value, the more length of the button need to be swiped.
  • app:button_confirm_text = Set the text to be just after the swipable threshold has been crossed.
  • app:button_post_confirm_text = Set the text to be shown after the user has removed their finger on a successful slide.
  • app:swipe_mode = 3 options to choose from. clamp, mirror, repeat. The default value set is clamp. Experiment with the colors and this mode for amazing effects.

Use android:text = "bla bla" to set the initial text.

Screenshots

See the melange of colors and the text change when swiping and when swipe is successful!!

The button when you first view it The button with clamp configuration using two colors The button with mirror configuration and two colors The button with clamp configuration and three colors The button with repeat configuration and two colors The button with mirror configuration and three colors

slidebutton's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.