@Override
  void onBackPressed() {
    LogUtil.logMessage(
        Storage.isRuleEditing() ? LogUtil.EDIT_RULE_CANCEL : LogUtil.CREATE_RULE_CANCEL);

    switchToEdit(FragmentName.MAIN);
  }
  @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);
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    onCreateView(inflater, container, savedInstanceState, R.string.title_select_transmitter, true);

    View view = inflater.inflate(R.layout.transmitter_fragment, container, false);

    ButterKnife.inject(this, view);

    mTransmitterAdapter = new TransmitterAdapter(this.getActivity());
    mListView.setAdapter(mTransmitterAdapter);

    LogUtil.logMessage(
        Storage.isRuleEditing() ? LogUtil.EDIT_RULE_TRANSMITTER : LogUtil.CREATE_RULE_TRANSMITTER);

    return view;
  }