List of usage examples for android.widget CompoundButton equals
public boolean equals(Object obj)
From source file:in.blogspot.anselmbros.torchie.ui.fragment.SettingsFragment.java
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (buttonView.equals(sw_screen_on)) { prefEditor.putBoolean(TorchieConstants.PREF_FUNC_SCREEN_UNLOCKED, isChecked).commit(); } else if (buttonView.equals(sw_lock_screen)) { prefEditor.putBoolean(TorchieConstants.PREF_FUNC_SCREEN_LOCKED, isChecked).commit(); } else if (buttonView.equals(sw_screen_off)) { prefEditor.putBoolean(TorchieConstants.PREF_FUNC_SCREEN_OFF, isChecked).commit(); } else if (buttonView.equals(cb_vibrate)) { prefEditor.putBoolean(TorchieConstants.PREF_FUNC_VIBRATE, isChecked).commit(); } else if (buttonView.equals(cb_proximity)) { prefEditor.putBoolean(TorchieConstants.PREF_FUNC_PROXIMITY, isChecked).commit(); }/*from w ww . ja v a2 s . c om*/ }
From source file:org.kei.android.phone.cellhistory.fragments.RecorderFragment.java
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (buttonView.equals(swOperator) || buttonView.equals(swMCC) || buttonView.equals(swMNC) || buttonView.equals(swCellId) || buttonView.equals(swLAC) || buttonView.equals(swCurrentGeolocation) || buttonView.equals(swCellGeolocation) || buttonView.equals(swPSC) || buttonView.equals(swType) || buttonView.equals(swNetwork) || buttonView.equals(swASU) || buttonView.equals(swLVL) || buttonView.equals(swSS) || buttonView.equals(swNeighboring) || buttonView.equals(swProvider) || buttonView.equals(swDistance) || buttonView.equals(swSatellites) || buttonView.equals(swSpeed) || buttonView.equals(swDataSpeedRx) || buttonView.equals(swDataSpeedTx) || buttonView.equals(swDataDirection) || buttonView.equals(swIpv4) || buttonView.equals(swIpv6) || buttonView.equals(swAreas)) { if (fromResume) return; FilterCtx f = app.getFilterCtx(); f.getOperator().allowSave = swOperator.isChecked(); f.getMCC().allowSave = swMCC.isChecked(); f.getMNC().allowSave = swMNC.isChecked(); f.getCellID().allowSave = swCellId.isChecked(); f.getLAC().allowSave = swLAC.isChecked(); f.getPSC().allowSave = swPSC.isChecked(); f.getType().allowSave = swType.isChecked(); f.getNetworkId().allowSave = swNetwork.isChecked(); f.getCellGeolocation().allowSave = swCellGeolocation.isChecked(); f.getCurrentGeolocation().allowSave = swCurrentGeolocation.isChecked(); f.getASU().allowSave = swASU.isChecked(); f.getLevel().allowSave = swLVL.isChecked(); f.getSignalStrength().allowSave = swSS.isChecked(); f.getNeighboring().allowSave = swNeighboring.isChecked(); f.getProvider().allowSave = swProvider.isChecked(); f.getDistance().allowSave = swDistance.isChecked(); f.getSatellites().allowSave = swSatellites.isChecked(); f.getSpeed().allowSave = swSpeed.isChecked(); f.getDataTxSpeed().allowSave = swDataSpeedTx.isChecked(); f.getDataRxSpeed().allowSave = swDataSpeedRx.isChecked(); f.getDataDirection().allowSave = swDataDirection.isChecked(); f.getIPv4().allowSave = swIpv4.isChecked(); f.getIPv6().allowSave = swIpv6.isChecked(); f.getAreas().allowSave = swAreas.isChecked(); f.writeSave(getActivity());//from w w w. j a v a 2 s . co m } else if (buttonView.equals(chkDisplaySwitch)) { Editor ed = prefs.edit(); ed.putBoolean(SW_DISPLAY, isChecked); ed.commit(); if (isChecked && switches.getVisibility() != View.VISIBLE) { Fx.setVisibilityAnimation(switches, View.VISIBLE, org.kei.android.atk.R.anim.fade_in); chkDisplaySwitch.setChecked(true); } else if (!isChecked && switches.getVisibility() != View.GONE) { Fx.setVisibilityAnimation(switches, View.GONE, org.kei.android.atk.R.anim.fade_out); chkDisplaySwitch.setChecked(false); } return; } }
From source file:org.borderstone.tagtags.TTProtocolActivity.java
@Override public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) { boolean proceed = true; if (buttonView.equals(lockSwitch)) { if (!isChecked) { for (ProtocolIsDataSavedListener l : listeners) { if (!l.hasDataBeenSaved()) { proceed = false;//from w w w . ja va 2s. co m } } } if (!proceed) { new BWarningDialog(this, "Yes, lock this row", "No, don't lock", "One or more mandatory fields have not been filled in!\nDo you wish to lock this row anyway?", new WarningMessageListener() { @Override public void acceptWarning(boolean tf) { if (tf) { changeStateOfAllWidgets(false); } else { lockSwitch.setChecked(true); } } }); } else { changeStateOfAllWidgets(isChecked); } } }