Code example for ToggleButton

Methods: isChecked

0
			this.setRetainInstance(true);
		super.onCreate(savedInstanceState);
	} 
 
	protected void logToggle() { 
		boolean state = logToggle.isChecked();
		PrefUtil.writeBoolean(getActivity(), Pref.LOG_KEY.key(), state);
		PrefUtil.notifyPrefChange(getActivity(), Pref.LOG_KEY.key(), state);
	} 
 
	protected void sendLog() { 
		Intent i = new Intent(getActivity(), WifiFixerActivity.class);
		i.putExtra(WifiFixerActivity.SEND_LOG, true);
		getActivity().startActivity(i);
	} 
 
	private void setIcon() { 
		/* 
		 * Draw icon 
		 */ 
		if (PrefUtil.readBoolean(getActivity(), Pref.LOG_KEY.key())) {