, AndroidMkab

How to add Switch button in android

In this post I will show you how to implement enable & disable Switch button in Android

  1. Open your Project in Android Studio and add below dependency in your build.gradle file then syn your project

2. Then add below code in your XML File

3. Add Below code in your Java Class file

Watch Below Video for better understanding

Karthik M