Skip to content

SetMaskedText is not displaying text #30

Open
@jailson-developer

Description

@jailson-developer

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]", "");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions