PinLockView icon indicating copy to clipboard operation
PinLockView copied to clipboard

Zero always "clicked" with selector drawable background

Open truongphamit opened this issue 6 years ago • 6 comments

truongphamit avatar Sep 11 '18 06:09 truongphamit

Confirmed. To reproduce, set this in your layout:

app:keypadButtonBackgroundDrawable="?attr/selectableItemBackgroundBorderless"

victorlapin avatar Sep 27 '18 11:09 victorlapin

Confirmed. To reproduce, set this in your layout:

app:keypadButtonBackgroundDrawable="?attr/selectableItemBackgroundBorderless"

I want to custom background drawable for the buttons

truongphamit avatar Sep 28 '18 02:09 truongphamit

Sure, I just provided an easy way to see the derp

victorlapin avatar Sep 28 '18 15:09 victorlapin

Any news on this? Should be an easy fix. Might take a look at it... If somebody has already fixed it, I'll be more than thankful to not waste my time redoing it 🙂

pargu avatar Feb 09 '19 15:02 pargu

To fix it you need just change CustomizationOptionsBundle.getButtonBackgroundDrawable() from public Drawable getButtonBackgroundDrawable() {
return buttonBackgroundDrawable;
}

to public Drawable getButtonBackgroundDrawable() {
return buttonBackgroundDrawable.getConstantState().newDrawable();
}

Kratos23 avatar Jul 14 '19 15:07 Kratos23

@truongphamit @pargu If anyone wants to use a version of this that is fixed, including the migration to AndroidX PR that hasn't been merged yet either, you can fork my repository https://github.com/Daniel-Wang/PinLockView

Daniel-Wang avatar Jul 19 '19 01:07 Daniel-Wang