From 1846da0c3cea8d3e3c22cf504c4703704975af3e Mon Sep 17 00:00:00 2001 From: Tarun Date: Sat, 1 Sep 2018 12:27:31 +0530 Subject: [PATCH] Update MainActivity.java --- TurnWifi/src/com/example/wifitest/MainActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TurnWifi/src/com/example/wifitest/MainActivity.java b/TurnWifi/src/com/example/wifitest/MainActivity.java index b232736..0ff9eb9 100644 --- a/TurnWifi/src/com/example/wifitest/MainActivity.java +++ b/TurnWifi/src/com/example/wifitest/MainActivity.java @@ -14,6 +14,8 @@ public class MainActivity extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + + // Will not work for latest versions Switch toggle = (Switch) findViewById(R.id.wifi_switch); toggle.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {