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

Zero always "clicked" with selector drawable background #53

Open
truongphamit opened this issue Sep 11, 2018 · 6 comments
Open

Zero always "clicked" with selector drawable background #53

truongphamit opened this issue Sep 11, 2018 · 6 comments

Comments

@truongphamit
Copy link

No description provided.

@victorlapin
Copy link

Confirmed. To reproduce, set this in your layout:

app:keypadButtonBackgroundDrawable="?attr/selectableItemBackgroundBorderless"

@truongphamit
Copy link
Author

Confirmed. To reproduce, set this in your layout:

app:keypadButtonBackgroundDrawable="?attr/selectableItemBackgroundBorderless"

I want to custom background drawable for the buttons

@victorlapin
Copy link

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

@pargu
Copy link

pargu commented Feb 9, 2019

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 🙂

@k4k7us23
Copy link

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

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

@Daniel-Wang
Copy link

@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

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

5 participants