コード例 #1
0
  private void setupCoordinatesInputField() {
    if (compassToLocationProvider != null) {
      CustomEditTextActionEditor latitudeActionEditor =
          new CustomEditTextActionEditor(getActivity(), longitudeEditText);
      CustomEditTextActionEditor longitudeActionEditor =
          new CustomEditTextActionEditor(getActivity(), latitudeEditText);

      latitudeEditText.setOnEditorActionListener(latitudeActionEditor);
      longitudeEditText.setOnEditorActionListener(longitudeActionEditor);
      latitudeEditText.addTextChangedListener(new CustomEditTextWatcher(true, this));
      longitudeEditText.addTextChangedListener(new CustomEditTextWatcher(false, this));
    }
  }
コード例 #2
0
 private void setCoordinatesEditTextEnabled(boolean value) {
   latitudeEditText.setEnabled(value);
   longitudeEditText.setEnabled(value);
 }