Philio / PinEntryView

A pin entry view widget for Android.
222 stars 83 forks source link

How to change mask in code. #40

Open mobilestar1 opened 7 years ago

mobilestar1 commented 7 years ago

I implemented this library and it works perfectly. Btw I want to add feature "show/hide pin"

So my guess is I need to change mask string in code.

How can I do this? Thanks.

eGorets commented 7 years ago
>     app:mask=""
adityaladwa commented 7 years ago

How to change it in code not xml. Also using databinding library as setting as app:mask="@{model.show ? `` :*}" throws an error. Can you make create getters and setters for mask so that we can do it in code?

adityaladwa commented 7 years ago

@eGorets Is there a way to change in code?

zfoltin commented 7 years ago

There isn't a setter in code for mask at the moment. As a workaround you can have two PinEntryViews in your layout, one with a mask and the other without, and flip their visibility when you toggle the show/hide pin button.