Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Ability to configure fulldot/emptydot drawable #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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 @@ -116,6 +116,11 @@ private void initLayout(Intent intent) {
mStepTextView = (TextView) this.findViewById(R.id.pin_code_step_textview);
mPinCodeRoundView = (PinCodeRoundView) this.findViewById(R.id.pin_code_round_view);
mPinCodeRoundView.setPinLength(this.getPinLength());

mPinCodeRoundView.setFullDotDrawable(getFullDotDrawableId());
mPinCodeRoundView.setEmptyDotDrawable(getEmptyDotDrawableId());
mPinCodeRoundView.refresh(mPinCode.length());

mForgotTextView = (TextView) this.findViewById(R.id.pin_code_forgot_textview);
mForgotTextView.setOnClickListener(this);
mKeyboardView = (KeyboardView) this.findViewById(R.id.pin_code_keyboard_view);
Expand All @@ -133,6 +138,20 @@ private void initLayout(Intent intent) {
setStepText();
}

/**
* Get full dot drawable id used by {@link com.github.orangegangsters.lollipin.lib.views.PinCodeRoundView}
*/
public int getFullDotDrawableId() {
return R.drawable.pin_code_round_full;
}

/**
* Get empty dot drawable id used by {@link com.github.orangegangsters.lollipin.lib.views.PinCodeRoundView}
*/
public int getEmptyDotDrawableId() {
return R.drawable.pin_code_round_empty;
}

/**
* Init {@link FingerprintManager} of the {@link android.os.Build.VERSION#SDK_INT} is > to Marshmallow
* and {@link FingerprintManager#isHardwareDetected()}.
Expand Down