Skip to content

SetMaskedText is not displaying text #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jailson-developer opened this issue Jun 1, 2017 · 0 comments
Open

SetMaskedText is not displaying text #30

jailson-developer opened this issue Jun 1, 2017 · 0 comments

Comments

@jailson-developer
Copy link

SetMaskedText is not displaying text when it does not have all the values ​​of the mask for example I have the following value 99 and the mask (##) #### - ####. Do you have any way to do it? I have now done the following

 @Override
   public void setMaskedText(String input) {
        int length = getTexto().length();
        String text = "";
      if (input.length() < length) {
          text = (new String(new char[length - input.length()]).replace("\0", " "));
       }
      super.setMaskedText(input + text);
   }


public String getTexto() {
    return getText().toString().replaceAll("[^ a-z0-9]", "");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant