Check for an empty PinBox {@link EditText} from the first.
Set focus in the first empty PinBox or notify that {@link PinView} is completed.
186374
void checkPinBoxesAvailableOrder() {

        int index = -1;
        for (int i = 0; i < mNumberPinBoxes; i++) {
            if (pinBoxIsEmpty(i)) {
                index = i;
                break;
            }
        }
        chooseNextAction(index);
    }
830302
public void setOnItemSelectedListener(AdapterView.OnItemSelectedListener l) {
        if(mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE)
            return;
        ((AutoCompleteTextView)mInputView).setOnItemSelectedListener(l);
    }
476192
@Override
    public final void onCompleted(String pin) {
        resetStatus();
        if (isPinCorrect(pin)) {
            setResult(SUCCESS);
            finish();
        } else {
            setLabel(getString(R.string.message_invalid_pin));
        }
    }
1269635
public void setSettings(PinViewSettings pinViewSettings) {
        mPinViewSettings = pinViewSettings;
        setColorTextPinBoxes(mPinViewSettings.getColorTextPinBox(), false);
        setColorTitles(mPinViewSettings.getColorTextTitles(), false);
        setCustomDrawablePinBox(mPinViewSettings.getCustomDrawablePinBox(), false);
        setColorSplit(mPinViewSettings.getColorSplit(), false);
        setDeleteOnClick(mPinViewSettings.isDeleteOnClick());
        setNativePinBox(mPinViewSettings.isNativePinBox(), false);
        setMaskPassword(mPinViewSettings.isMaskPassword(), false);
        setKeyboardMandatory(mPinViewSettings.isKeyboardMandatory());
        setNumberCharacters(mPinViewSettings.getNumberCharacters(), false);
        setSplit(mPinViewSettings.getSplit(), false);
        setSizeSplit(mPinViewSettings.getSizeSplit(), false);
        setTextSizePinBoxes(mPinViewSettings.getTextSizePinBox(), false);
        setTextSizeTitles(mPinViewSettings.getTextSizeTitles(), false);

        setTitles(mPinViewSettings.getPinTitles());
        setPin(mPinViewSettings.getNumberPinBoxes());
    }
920445
public final void setHint (CharSequence hint){
		mInputView.setHint(hint);
		if(mLabelView != null)
			mLabelView.setText(hint);
	}
753114
public void onClickOk(@NonNull View view) {
        if (mListener == null) {
            return;
        }

        // Some invalid cases first
        /*if (MODE_NEW_FILE == mode && !isValidFileName(getNewFileName())) {
            mToast = Toast.makeText(getActivity(), R.string.nnf_need_valid_filename,
                    Toast.LENGTH_SHORT);
            mToast.show();
            return;
        }*/
        if ((allowMultiple || mode == MODE_FILE) &&
                (mCheckedItems.isEmpty() || getFirstCheckedItem() == null)) {
            if (mToast == null) {
                mToast = Toast.makeText(getActivity(), R.string.nnf_select_something_first,
                        Toast.LENGTH_SHORT);
            }
            mToast.show();
            return;
        }

        // New file allows only a single file
        if (mode == MODE_NEW_FILE) {
            final String filename = getNewFileName();
            final Uri result;
            if (filename.startsWith("/")) {
                // Return absolute paths directly
                result = toUri(getPath(filename));
            } else {
                // Append to current directory
                result = toUri(getPath(appendPath(getFullPath(mCurrentPath), filename)));
            }
            mListener.onFilePicked(result);
        } else if (allowMultiple) {
            mListener.onFilesPicked(toUri(mCheckedItems));
        } else if (mode == MODE_FILE) {
            //noinspection ConstantConditions
            mListener.onFilePicked(toUri(getFirstCheckedItem()));
        } else if (mode == MODE_DIR) {
            mListener.onFilePicked(toUri(mCurrentPath));
        } else {
            // single FILE OR DIR
            if (mCheckedItems.isEmpty()) {
                mListener.onFilePicked(toUri(mCurrentPath));
            } else {
                mListener.onFilePicked(toUri(getFirstCheckedItem()));
            }
        }
    }
771754
TextView generatePinText(int i, String[] titles) {
        TextView pinTitle = (TextView) LayoutInflater.from(getContext())
                .inflate(R.layout.partial_pin_text, this, false);
        int generateViewId = PinViewUtils.generateViewId();
        pinTitle.setId(generateViewId);
        pinTitle.setText(titles[i]);
        setStylesPinTitle(pinTitle);
        pinTitlesIds[i] = generateViewId;
        return pinTitle;
    }
1169770
private void createEditModeView(Context context) {
        ((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
                .inflate(R.layout.pin_view_edit_mode, this,
                        true);
    }
1149490
public void setEmptyView(View emptyView){
        if(this.emptyView != null){
            unregisterAdapterDataObserver(mEmptyObserver);
        }
        this.emptyView = emptyView;
        registerAdapterDataObserver(mEmptyObserver);
    }
35056
public void setEmptyView(View emptyView) {
        mEmptyView = emptyView;

        final ListAdapter adapter = getAdapter();
        final boolean empty = ((adapter == null) || adapter.isEmpty());
        updateEmptyStatus(empty);
    }
1363541
synchronized void onComplete(@javax.annotation.Nullable Throwable error) {
    if (isCompleted()) {
      return;
    }
    currentConfigObserver = null;
    // TODO(songya): add Runnable
    Status status;
    if (error == null) {
      status = Status.OK;
    } else if (error instanceof StatusRuntimeException) {
      status = ((StatusRuntimeException) error).getStatus();
    } else {
      status = Status.UNKNOWN;
    }
    terminateStatus = status;
  }
677786
public void enterTextAndWait(int fieldResource, String value)
    {
        EditText textBox = (EditText) this.getView(fieldResource);
        this.enterText(textBox, value);
        this.waitForText(value);
    }
735261
protected void onSelectionChanged(int selStart, int selEnd) {
        if(mInputView == null)
            return;

        if(mInputView instanceof InternalEditText)
            ((InternalEditText)mInputView).superOnSelectionChanged(selStart, selEnd);
        else if(mInputView instanceof InternalAutoCompleteTextView)
            ((InternalAutoCompleteTextView)mInputView).superOnSelectionChanged(selStart, selEnd);
        else
            ((InternalMultiAutoCompleteTextView)mInputView).superOnSelectionChanged(selStart, selEnd);

        if(mOnSelectionChangedListener != null)
            mOnSelectionChangedListener.onSelectionChanged(this, selStart, selEnd);
    }
911409
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++;
            }
        }
    }
511564
private void onBindViewHolder(Context context, PeasyViewHolder holder, int position) {
        if (holder == null) return;
        try {
            if (headerContent != null && holder.isHeaderView()) {
                headerContent.onBindViewHolder(context, holder.asIs(PeasyHeaderViewHolder.class), position, getItem(position));
            }
        } catch (Exception ignored) {
        }
        try {
            if (footerContent != null && holder.isFooterView()) {
                footerContent.onBindViewHolder(context, holder.asIs(PeasyFooterViewHolder.class), position, getItem(position));
            }
        } catch (Exception ignored) {
        }
        onBindViewHolder(context, holder, position, getItem(position));
    }
1362212
public void setIconPos(IconPos pos) {
        if (pos == null) {
            JQMCommon.setIconPos(this, pos);
        } else {
            IconPos oldPos = getIconPos();
            JQMCommon.setIconPos(this, pos);
            for (int i = 0; i < buttons.size(); i++) {
                JQMButton btn = buttons.get(i);
                IconPos p = btn.getIconPos();
                if (p == null || oldPos == null || p.equals(oldPos)) btn.setIconPos(pos);
            }
        }
    }
118948
public void myFocusGained()
    {
        m_bInFocus = true;
        String strText = super.getText();
        if (m_strDescription.equals(strText))
        {   // Don't notify of change
            if (m_actionListener != null)
                this.removeActionListener(m_actionListener);
            this.changeFont(false);
            super.setText(Constants.BLANK);
            if (m_actionListener != null)
                this.addActionListener(m_actionListener);
        }
    }