Code example for ToggleButton

Methods: toggle

0
		}); 
	} 
	 
	private void showLocalTasks(boolean isLocalOnly) {
		if (latestLocation == null) {
			localTaskToggleButton.toggle();
			//TODO XXX popup no GPS is running 
			return; 
		} 
		if (isLocalOnly) {
			adapter.filterTasksByLocation(latestLocation, LOCATION_FILTER_DISTANCE);
		} else { 
			adapter.removeLocationFilter();
		} 
	} 
 
 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present. 
		getMenuInflater().inflate(R.menu.main, menu);