Code example for ToggleButton

Methods: setEnabled

0
				Log.i(LOG_TAG, "Connection to IOIO aquired"); 
				runOnUiThread(new Runnable() { 
					@Override 
					public void run() { 
						seekBar.setEnabled(true); 
						toggleButton.setEnabled(true); 
					} 
				}); 
			} catch (PeripheralException.OperationAbortedException e) { 
				Log.e(LOG_TAG, e.getMessage()); 
				return; 
			} catch (SocketException e) { 
				Log.e(LOG_TAG, e.getMessage()); 
				return; 
			} 
 
			// Setting pin 40 for picking up analog signals. 
			final AnalogInput input; 
			try { 
				input = ioio.openAnalogInput(40); 
			} catch (PeripheralException e) {