refactored afterTextChanged in textWatcher

This commit is contained in:
Chumva 2018-04-02 16:29:20 +03:00
parent 0e9b4723de
commit 844328c6ef

View file

@ -630,9 +630,8 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
if (focusedView != null && focusedView instanceof EditTextEx) { if (focusedView != null && focusedView instanceof EditTextEx) {
EditTextEx et = (EditTextEx) focusedView; EditTextEx et = (EditTextEx) focusedView;
int currentLength = et.getText().length(); int currentLength = et.getText().length();
String lonFirstInput;
if (et.getId() == R.id.lon_first_input_et) { if (et.getId() == R.id.lon_first_input_et) {
lonFirstInput = editable.toString(); String lonFirstInput = et.getText().toString();
if (currentLength == 2) { if (currentLength == 2) {
if (lonFirstInput.charAt(0) != '1' && lonFirstInput.charAt(0) != '0') { if (lonFirstInput.charAt(0) != '1' && lonFirstInput.charAt(0) != '0') {
switchEditText(et.getId(), true); switchEditText(et.getId(), true);