Insert hyphen ("dash" -) automatically as user type

1

Is there any way for as long as the user types in a EditText go by inserting hyphen (-) every 4 characters typed? In the same way some licenses work, the dash (-) is already inserted automatically.

    
asked by anonymous 04.05.2015 / 21:55

1 answer

1

It has a legal tutorial and works at run time here :

Just change Mask.insert ("###. ###. ### - ##", cpf) for the mask you want.

    
04.05.2015 / 22:00