@@ -304,13 +304,15 @@ dbHelper.getRecordCount(tableName, values, hasConditions, conditionalValues);
304304``` java
305305// the below code shows how to use the SwitchButton to get the selected values.
306306SwitchButton switchButton = findViewById(R . id. switchButton);
307+
308+ // this is the on switch listener for switchButton
307309switchButton. setOnSwitchListener(new SwitchButton .OnSwitchListener ()
308310{
309- @Override
310- public void onSwitch(int i, String tabText)
311- {
312- Toast . makeText(MainActivity . this , " selected tab text is: " + tabText, Toast . LENGTH_SHORT ). show();
313- }
311+ @Override
312+ public void onSwitch(int i, String tabText)
313+ {
314+ Toast . makeText(MainActivity . this , " selected tab text is: " + tabText, Toast . LENGTH_SHORT ). show();
315+ }
314316});
315317```
316318
@@ -357,9 +359,7 @@ myLocation.getLocation(this, locationResult);
357359// declare this inside onCreate() method or anywhere you would like to use it.
358360// on button click or anywhere.
359361
360- LocationAddress . getAddressFromLocation(
361- mLatitude, mLongitude, this ,
362- new GeocoderHandler ());
362+ LocationAddress . getAddressFromLocation(mLatitude, mLongitude, this , new GeocoderHandler ());
363363
364364// this is the GeocoderHandler class where you'll get the address
365365private class GeocoderHandler extends Handler
@@ -472,5 +472,5 @@ Validator.noSpecialCharacters("abcd123");
472472
473473// atLeastOneSpecialCharacters validation, returns true or false.
474474Validator . atLeastOneSpecialCharacters(" abcd@123" );
475-
476475```
476+
0 commit comments