code: public void setPin(int numberPinBoxes, int inputType) {
          if(numberPinBoxes<=0) {
              numberPinBoxes = mNumberPinBoxes;
          }
  
          mLinearLayoutPinBoxes.removeAllViews();
          setNumberPinBoxes(numberPinBoxes);
          pinBoxesIds = new int[numberPinBoxes];
          pinSplitsIds = new int[numberPinBoxes-1];
          int index = 0;
  
          for (int i = 0; i < numberPinBoxes; i++) {
              mLinearLayoutPinBoxes.addView(generatePinBox(i, inputType), index);
              if (mSplit != null && !mSplit.isEmpty() && i < numberPinBoxes - 1) {
                  mLinearLayoutPinBoxes.addView(generateSplit(i), index + 1);
                  mLinearLayoutPinBoxes.setGravity(Gravity.CENTER_VERTICAL);
                  index += 2;
              } else {
                  index++;
              }
          }
      }
docs: Set PinBoxes (see {@link EditText}) number to add to {@link PinView}, with all attributes, including splits.
  
  @param numberPinBoxes number of PinBoxes
  @param inputType input type of each PinBox (see {@link InputType})