Closed F0RIS closed 6 years ago
@F0RIS could you paste your xml layout here to check that?
@MahdiPishguy https://pastebin.com/HfnvSH5h
@F0RIS Thanks, in your layout parent xml as Linearlayout i see this attributes:
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
did you try to change them and test again?
@MahdiPishguy yes, FancyButton doesn't read clickable attribute from xml, it just set it here https://github.com/medyo/Fancybuttons/blob/master/fancybuttons_library/src/main/java/mehdi/sakout/fancybuttons/FancyButton.java#L509 Probably that's why it doesnt pass touch to parent view
@F0RIS yes you right, set that by default that cause of this problem, please let me to commenting them, thanks in advance
@F0RIS did you try to commenting them on source code and use that on your project? instead of using gradle to install?
@MahdiPishguy Checked it now, with commenting next lines
this.setClickable(true); this.setFocusable(true);
It works as it should
@F0RIS ok, thanks, i commented them
When I set
android:clickable
andandroid:focusable
attributes tofalse
it doesn't work how it works in standart button. It must pass click event to parent view and not prevent it from further processing. This can be usefull when necessary to set up one clicklistener at whole item like this one:Of course I can set all this in my code, but any way, it should copy this behavior from native android button