Toggle Button in Android Displays checked/unchecked states as a button with a "light" indicator and by default accompanied with the text "ON" or "OFF". main.xml <? xml version = "1.0" encoding = "utf-8" ?> < LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android" android:orientation = "vertical" android:layout_width = "fill_parent" android:layout_height = "fill_parent" > < LinearLayout android:id = "@+id/linearLayout1" android:layout_width = "match_parent" android:layout_height = "wrap_content" > < TextView android:text = "Select" android:id = "@+id/textView1" android:layout_width = "wrap_content" ...
If you are a beginner , then this blog will help you to dive into the basics.