Pinview icon indicating copy to clipboard operation
Pinview copied to clipboard

how to clear the entered text of Pinview

Open AkshaySinghR opened this issue 7 years ago • 6 comments

AkshaySinghR avatar Feb 20 '18 10:02 AkshaySinghR

Same problem I'm getting. I also need onTextChangeListener in this widget

mohitrajput987 avatar Apr 27 '18 07:04 mohitrajput987

i found solution, it's working for me but first view show 0 by default.. pinViewObj.setPinViewEventListener(null); pinViewObj.setValue("0"); pinViewObj.setHint("0"); pinViewObj.setPinViewEventListener(YourActivity.this);

Vijaykumarj avatar May 15 '18 12:05 Vijaykumarj

Looks like the fix has been merged but not yet released. For now you can use implementation "com.github.GoodieBag:Pinview:f2e2763acc" which is base on #7 , then you can setValue("")

FantasyCheese avatar Jul 21 '18 12:07 FantasyCheese

i found solution, it's working for me. private void clearPinViewChild() { for (int i = 0; i < pinView.getChildCount() ; i++) { EditText child = (EditText) pinView.getChildAt(i); child.setText(""); } }

heartlesskp avatar Aug 07 '18 08:08 heartlesskp

Well due to this issue. I have created my own PinView which not only able to clear the text, I made onTextChanged method also in it which is very useful. Also, I have made it using one EditText only, we don't need to use the list of EditText.

mohitrajput987 avatar Aug 08 '18 05:08 mohitrajput987

pinView.editableText.clear()

MostafaMohammedSayed avatar Aug 23 '23 06:08 MostafaMohammedSayed