SASlider is lightweight cool looking custom slider control which enables the user to input integer or decimal values with high customizeability

Overview

SASlider

Description

SASlider is lightweight cool looking custom slider control which enables the user to input integer or decimal values with high customizeability. User can select values by inputting in text field above slider, slide the control or tap anywhere on the slider to move it.



Demonstration

Multiple ways to input values into the slider.



Installation

SASlider can be installed using Maven, Gradle, or manually.

Maven

Step 1. Add the JitPack repository to your build file

<repositories>
    <repository>
        <id>jitpack.ioid>
        <url>https://jitpack.iourl>
    repository>
repositories>

Step 2. Add the dependency

<dependency>
    <groupId>com.github.salmaanahmedgroupId>
    <artifactId>SASliderartifactId>
    <version>0.1version>
dependency>

Gradle

Step 1. Add the JitPack repository to your build file

allprojects {
    repositories {
      ...
      maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
  compile 'com.github.salmaanahmed:SASlider:0.1'
}

Manual Installation

If you prefer not to use either of the above mentioned dependency managers, you can integrate SASlider into your project manually by adding the files contained in the java folder to your project.

Getting Started

Using XML

You can use SASlider in XML as following

">
<sasliderdemo.salmaan.ahmsal.com.saslider.SASlider
    android:layout_width="match_parent"
    android:layout_height="100dp"
    android:layout_marginBottom="50dp"
    app:layout_constraintTop_toTopOf="parent"
    app:circleColor="@android:color/darker_gray"
    app:defaultValue="150"
    app:editTextBorderColor="@color/colorGrey"
    app:isDecimal="false"
    app:maxValue="300"
    app:minValue="0"
    app:criticalColor="@color/darkRed"
    app:upperThreshold="200"
    app:lowerThreshold="100"
    app:sliderColor="@color/darkGreen" />

High customizeability allows developers to have desired color of circles, slider thumb, edit text border and color of thumb when slider value is critical i.e. beyond the defined thresholds. Developers can set the slider type to decimal or integer. Set min max range and also the critical thresholds of both upper and lower bounds.

Using Kotlin

You can create the slider programatically as well, see the example below.

  val slider = SASlider(this@MainActivity)
  slider.sliderColor = Color.BLUE
  slider.min = 0.0
  slider.max = 50.0
  slider.criticalColor = Color.BLACK
  slider.isDecimal = true
  linearLayout.addView(slider)

Getting value

Developers can query the current value anytime in the slider using the following variable.

slider.selectedIndex

Contributions and Licence

SASlider is available under the MIT license. See the LICENSE file for more info.

Pull requests are welcome! The best contributions will consist of substitutions or configurations for classes/methods known to block the main thread during a typical app lifecycle.

I would love to know if you are using SASlider in your app, send an email to Salmaan Ahmed

You might also like...
Application: SLA report This application calculates, based on an input, the average duration per service of Axon.

Application: SLA report This application calculates, based on an input, the average duration per service of Axon.

A High Copy WeChat ,SNS APP (高仿微信)
A High Copy WeChat ,SNS APP (高仿微信)

WeChat Social apps are popular all over the world, such as Facebook, Line, Whatsapp, and Kakao. Do you still worry about their own social project modu

This SDK can be used to identify a user via passport or ID Card prove identity of user via Biometry comparing selfie and photo from chip of ID Doc LocationPhoneMode - The app will ask the user to allow it to track the user location
LocationPhoneMode - The app will ask the user to allow it to track the user location

LocationPhoneMode The app will ask the user to allow it to track the user locati

Android application for GitHub user search and view user details
Android application for GitHub user search and view user details

GitHubApp Android application for GitHub user search and view user details Architecture UI observing the live data for the main list as received from

An App based on MVVM architecture to track & store a user's runs using Google Maps, with options to view & sort the runs as per the user's choice along the with option to run the app in background.
An App based on MVVM architecture to track & store a user's runs using Google Maps, with options to view & sort the runs as per the user's choice along the with option to run the app in background.

An App based on MVVM architecture to track & store a user's runs using Google Maps, with options to view & sort the runs as per the user's choice along the with option to run the app in background.

A simple material design app intro with cool animations and a fluent API.
A simple material design app intro with cool animations and a fluent API.

material-intro A simple material design app intro with cool animations and a fluent API. Very inspired by Google's app intros. Demo: A demo app is ava

Photon Framework provides cool way to Discord Slash Commands 👩‍💻 🚧

Photon Framework provides cool way to Discord Slash Commands 👩‍💻 🚧

Ground Control Station for Android Devices

Tower Tower is a Ground Control Station (GCS) Android app built atop DroneKit-Android, for UAVs running Ardupilot software. Usage Guide The wiki has s

Releases(0.1)
Owner
Salmaan Ahmed
Salmaan Ahmed
An Open Source App which enables users to drop all their professional handles and projects at one place.

An Open Source App which enables users to drop all their professional handles and projects at one place. This is a Beginner Friendly Repository made for Open Source Enthusiasts who can contribute to the App during HacktoberFest 2021.

GDSC JSS Noida 32 May 26, 2022
☁️🌤🌧☀ Weather Android application that gives you the weather information of your saved location or any region you are looking for☁️🌤🌧☀

☁️????☀ Weather Android application that gives you the weather information of your saved location or any region you are looking for☁️????☀

Nisa Efendioğlu 4 Apr 6, 2022
My CS 4th semester homework: simple Android app for looking up cocktails using an open API

CocktailApp My CS 4th semester homework: simple Android app for looking up cocktails using an open API A simple Android app that uses the free api of

null 2 May 18, 2022
Retracer is a high performance, and near realtime REST API which used for Java/Android stack trace retracing by R8

Retracer is a high performance, and near realtime REST API which used for Java/Android stack trace retracing by R8 Getting Started docker

Johnson Lee 3 Aug 21, 2022
Connect UPG is an app that enables students to interact and share their thoughts, emotions, feeling as things

Connect UPG is an app that enables students to interact and share their thoughts, emotions, feeling as things

Krish Parekh 7 Jan 18, 2022
Mobile App that that enables users to manager product listing IProcure Ltd Senior Android Engineer Role interview solution

Mobile App that that enables users to manager product listing (in and e-commerce environment) IProcure Ltd Senior Android Engineer Role interview solution

Daniel Waiguru 6 Nov 1, 2022
Pixel Launcher Mods a root app for Android 12+ that enables you to add a number of features to the stock Pixel Launcher

A root app that enables you to add a number of features to the stock Pixel Launcher, without needing Xposed

Kieron Quinn 430 Jan 2, 2023
A template for Advent of Code challenge with input downloading and prepared test classes

Advent of Code Kotlin Template A template which will help you concentrate on the puzzle solutions. It brings Downloading and caching of the puzzle inp

Henning B 2 Dec 1, 2021
A Tip Calculator app written in Kotlin that takes Total cost as an input and calculate tip according to the feedbacks.

Create a Tip Calculator App Code for the Android Basics in Kotlin: Create a Tip Calculator app codelab. In this codelab, you will be writing code for

Hemant Sachdeva 1 Dec 4, 2021
A simple app to test your device input sample rate.

Android touch sample rate test tool This tool can help you check the touch sample rate of the Android device. Supported input method: Touch Mouse Styl

samnyan 4 Sep 28, 2022