Skip to main content

Posts

Showing posts with the label Toggle button in android

Toggle Button in Android

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"         android:layout_height = "wrap_content" >         </ TextView >         < ToggleButton