Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private void initCustomAttributes(AttributeSet attributeset) {
hintText = attributes.getString(R.styleable.core_area_hint_text);
underlineAmount = attributes.getInt(R.styleable.core_area_codes, underlineAmount);
textColor = attributes.getInt(R.styleable.core_area_text_color, textColor);

attributes.recycle();
}

Expand Down Expand Up @@ -227,14 +227,15 @@ private void showKeyboard() {
inputmethodmanager.viewClicked(this);
}

private void hideKeyBoard(){
private void hideKeyBoard() {
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(getWindowToken(), InputMethodManager.RESULT_UNCHANGED_SHOWN);
}

/**
* Set Input type like InputType.TYPE_CLASS_PHONE, InputType.TYPE_CLASS_NUMBER
* Doesn't work for password
*
* @param inputType
*/
public void setInputType(int inputType) {
Expand Down Expand Up @@ -319,6 +320,16 @@ public void run() {
}, animationDuration);
}

/**
* Set code length
*
* @param codeLength number of underlines
*/
public void setCodeLength(int codeLength) {
this.underlineAmount = codeLength;
initDataStructures();
}

/**
* String text
* Pass empty string to remove text
Expand Down