@Test public void testLocalizedSeparator() { localizedNumberEditText.setText("1" + localizedSeparator + "2"); Assert.assertEquals("1" + localizedSeparator + "2", localizedNumberEditText.getText().toString()); Assert.assertEquals("1.2", localizedNumberEditText.getNonLocalizedText()); }
public String getNonLocalizedText() { return getText().toString().replace(LOCALIZED_SEPARATOR, DEFAULT_SEPARATOR); }
LocalizedNumberEditText extends AppCompatEditText implements TextWatcher { public String getNonLocalizedText() { return getText().toString().replace(LOCALIZED_SEPARATOR, DEFAULT_SEPARATOR); } }
LocalizedNumberEditText extends AppCompatEditText implements TextWatcher { public String getNonLocalizedText() { return getText().toString().replace(LOCALIZED_SEPARATOR, DEFAULT_SEPARATOR); } LocalizedNumberEditText(Context context);  LocalizedNumberEditText(Context context, AttributeSet attrs);  LocalizedNumberEditText(Context context, AttributeSet attrs, int defStyleAttr); }
LocalizedNumberEditText extends AppCompatEditText implements TextWatcher { public String getNonLocalizedText() { return getText().toString().replace(LOCALIZED_SEPARATOR, DEFAULT_SEPARATOR); } LocalizedNumberEditText(Context context);  LocalizedNumberEditText(Context context, AttributeSet attrs);  LocalizedNumberEditText(Context context, AttributeSet attrs, int defStyleAttr); String getNonLocalizedText(); Float getNumber(); boolean hasNumber(); void restrictToLocalizedSeparator(boolean restrictToLocalizedSeparator); boolean isRestrictedToLocalizedSeparator(); @Override void setInputType(int type); @Override void setKeyListener(KeyListener keyListener); @Override void onTextChanged(CharSequence text, int start, int before, int count); @Override void beforeTextChanged(CharSequence text, int start, int count, int after); @Override void afterTextChanged(Editable editable); }
LocalizedNumberEditText extends AppCompatEditText implements TextWatcher { public String getNonLocalizedText() { return getText().toString().replace(LOCALIZED_SEPARATOR, DEFAULT_SEPARATOR); } LocalizedNumberEditText(Context context);  LocalizedNumberEditText(Context context, AttributeSet attrs);  LocalizedNumberEditText(Context context, AttributeSet attrs, int defStyleAttr); String getNonLocalizedText(); Float getNumber(); boolean hasNumber(); void restrictToLocalizedSeparator(boolean restrictToLocalizedSeparator); boolean isRestrictedToLocalizedSeparator(); @Override void setInputType(int type); @Override void setKeyListener(KeyListener keyListener); @Override void onTextChanged(CharSequence text, int start, int before, int count); @Override void beforeTextChanged(CharSequence text, int start, int count, int after); @Override void afterTextChanged(Editable editable);  }