Open RuynLe opened 7 years ago
Yeah I made a little hack
public void updateSMSCode(String code) { char[] codeSplit = code.toCharArray(); for (int i = 0; i < otpPin.getChildCount(); i++) { LinearLayout top = (LinearLayout) otpPin.getChildAt(i); if (top != null) {//safe check // LinearLayout pinTitleView = (LinearLayout) top.getChildAt(0); LinearLayout pinView = (LinearLayout) top.getChildAt(1); if (pinView != null) { for (int j = 0; j < otpLength; j++) { EditText pinEdit = (EditText) pinView.getChildAt(j); if (pinEdit != null) { pinEdit.setText(String.valueOf(codeSplit[j])); } } } } } }
Hi David, thanks your for share. I have a string value, I want to set it to pinview. How can I do that?