Code example for ToggleButton

Methods: setEnabledsetChecked

0
		} 
	} 
 
	@UiThread 
	protected void handleDomainUpdateSuccess() { 
		hasVanityNS.setChecked(((Domain)parent).getHas_ns()) ;
		domainUpdateBusyIndicator.setVisibility(View.GONE) ;
		hasVanityNS.setEnabled(true) ;
	} 
 
	@UiThread 
	protected void handleDomainUpdateFailure(String title, String message) {
		hasVanityNS.setChecked(((Domain)parent).getHas_ns()) ;
		AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()) ;
		builder.setTitle(title) ;
		builder.setMessage(message) ;
		builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
			 
			@Override 
			public void onClick(DialogInterface dialog, int which) {
				dialog.dismiss() ;