Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

quibbler01/SwitchButton

Repository files navigation

SwitchButton

switch_preview

Step 1. 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.quibbler01:SwitchButton:1.0.2'
}

Step 3. Add SwitchButton in your layout xml:

<cn.quibbler.switchbutton.SwitchButton
 android:id="@+id/switch_button"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content" />

Step 4. Use it in your way.

 //find this SwitchButton
 val switchButton = binding.switchButton
 //set checked
 switchButton.toggle(true)
 //set unchecked
 switchButton.toggle(false)

About

SwitchButton

Resources

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /