This example shows how to create and set Switches in android.
Algorithm:
1.) Create a new project by File-> New -> Android Project name it SwitchesExample.
2.) Write following into main.xml:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <? xml version = "1.0" encoding = "utf-8" ?> < ScrollView xmlns:android = "http://schemas.android.com/apk/res/android" android:layout_width = "match_parent" android:layout_height = "match_parent" > < LinearLayout android:orientation
|