@OnItemClick(R.id.list_view) public void onItemClick(int position) { if (Storage.isRuleEditing()) findSensorId(mTransmitterAdapter.getItem(position), Storage.getRule().getSensorType()); else { saveTransmitterData(mTransmitterAdapter.getItem(position)); switchToEdit(FragmentName.SENSOR); } LogUtil.logMessage( Storage.isRuleEditing() ? LogUtil.EDIT_RULE_FINISH : LogUtil.CREATE_RULE_FINISH); }
private void saveTransmitterData(Transmitter transmitter) { Storage.getRule().transmitterId = transmitter.id; Storage.getRule().transmitterName = transmitter.getName(); Storage.getRule().transmitterType = "Relayr WunderBar"; }