Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete button not clickable when visible #49

Open
CallumCoombes opened this issue Jul 12, 2018 · 4 comments
Open

Delete button not clickable when visible #49

CallumCoombes opened this issue Jul 12, 2018 · 4 comments

Comments

@CallumCoombes
Copy link

I have encountered a strange bug. In one of my activities the keypad delete button cannot be used even though it is set to true in the XML and is visible. This only occurs in one activity, all other activities function correctly.

This is my xml for the layout (identical to one that works in another activity):

<com.andrognito.pinlockview.PinLockView
            android:id="@+id/activeTaskViewPinLockView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="48dp"
            app:keypadButtonSize="72dp"
            app:keypadShowDeleteButton="true"
            app:keypadTextColor="@color/white"
            app:keypadTextSize="18dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent" />

in onCreate I set it up:

pinLockView.attachIndicatorDots(pinLockIndicatorDots);
pinLockView.resetPinLockView();
pinLockListener = new PinLockListener() {
      @Override
       public void onComplete(String pin) {
           //do stuff
        }

       @Override
        public void onEmpty() {
              
        }

        @Override
        public void onPinChange(int pinLength, String intermediatePin) {
              
        }
  };
pinLockView.setPinLockListener(pinLockListener);

This code is identical to that of a working activity. So I am stumped as to what is causing it.

Any ideas?

@CallumCoombes
Copy link
Author

CallumCoombes commented Jul 12, 2018

After further testing, it only happens when I call resetPinLockView when there is no code entered.

If I call resetPinLockView with >0 characters entered, the delete button functions. However, as soon as I call resetPinLockView with 0 characters entered, the delete button no longer works.

@CallumCoombes
Copy link
Author

CallumCoombes commented Jul 12, 2018

Realised this is a duplicate of this issue

@raptus93
Copy link

I just found this out:
When you set the color of the buttons by calling

pinLockView.setTextColor(myColor)

and then call

pinLockView.resetPinLockView()

(independent of the number of characters, even > 0),
then the delete button doesn't work as well. I fixed this by not setting the color in code, lawl.

@Ium-Lab
Copy link

Ium-Lab commented May 27, 2019

After further testing, it only happens when I call resetPinLockView when there is no code entered.

If I call resetPinLockView with >0 characters entered, the delete button functions. However, as soon as I call resetPinLockView with 0 characters entered, the delete button no longer works.

Did you fix the bug finally ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants