Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
/ sweetseekbar Public archive

Modern Seekbar like ios volume controller

Notifications You must be signed in to change notification settings

vahidctt/sweetseekbar

Repository files navigation

sweetseekbar

Modern Seekbar like ios volume controller

alt text

Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

dependencies {
	        implementation 'com.github.vahidctt:sweetseekbar:v1.1'
	}

USAGE in layout XML

<org.dakik.sweetseekbar.SweetSeekbarView
    android:id="@+id/ss"
    android:layout_margin="20dp"
    app:frontTint="@color/colorPrimary"
    app:backTint="#ffa"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
</org.dakik.sweetseekbar.SweetSeekbarView>

<org.dakik.sweetseekbar.SweetSeekbarView
        android:id="@+id/ssH"
        app:orientation="horizontal"
        android:layout_margin="20dp"
        app:enableBounceAnim="false"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
    </org.dakik.sweetseekbar.SweetSeekbarView>

USAGE in Code

 SweetSeekbarView ss=new SweetSeekbarView(context);
        ss.setRadius(topLeft,topRight,bottomRight,bottomLeft);
        ss.setListener(new SweetSeekbarListener() {
            @Override
            public void onStart(int value) {

            }

            @Override
            public void onMove(int value) {

            }

            @Override
            public void onEnd(int value) {

            }
        });
        //You can set percentage use "setMaxValue" function.
        ss.setMaxValue(100);
        //You can set value programmatically
        ss.setValue(50);

About

Modern Seekbar like ios volume controller

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages