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

Ability to configure fulldot/emptydot drawable#152

Open
bertrandmartel wants to merge 1 commit intoomadahealth:masterfrom
bertrandmartel:dot-drawable
Open

Ability to configure fulldot/emptydot drawable#152
bertrandmartel wants to merge 1 commit intoomadahealth:masterfrom
bertrandmartel:dot-drawable

Conversation

@bertrandmartel
Copy link

@bertrandmartel bertrandmartel commented Sep 14, 2017

I've added the ability to set drawable id for FullDotDrawable & EmptyDotDrawable. Usage is for instance in CustomActivity` :

@Override
public int getFullDotDrawableId() {
    return R.drawable.pin_code_full_custom;
}

@Override
public int getEmptyDotDrawableId() {
    return R.drawable.pin_code_empty_custom;
}

Sample with rectangle shape with light_gray color :

pincode

Related #75

Copy link

@Hatzen Hatzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. As i dont believe this will be merged so fast here is a (dirty) workaround for everyone interested:
Extend AppLockActivity and override onUserInteraction() to contain the following lines.

override fun onUserInteraction() { super.onUserInteraction() mPinCodeRoundView.setFullDotDrawable(R.drawable.pin_code_round_filled) mPinCodeRoundView.refresh(mPinCode.length) }

Big thanks @bertrandmartel

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants