RippleEffect icon indicating copy to clipboard operation
RippleEffect copied to clipboard

Steals OnClick when creating a compound view with it on the layout

Open jacatanog opened this issue 9 years ago • 5 comments

Basically what I'm doing is extending RelativeLayout to create a new custom "ViewGroup" and inflating the layout that has the ripple view on it.

When I click on the compound view the click is not received by the compound view but by the RippleView so there is no way to catch the event unless I declare a android:OnClick property on the RippleView and handle it on the activity that has the custom ViewGroup.

jacatanog avatar Apr 07 '15 20:04 jacatanog

Have you found a solution to this?

amalChandran avatar Apr 24 '15 22:04 amalChandran

Same problem

mortenholmgaard avatar Jun 02 '15 17:06 mortenholmgaard

try this in rippleView

android:descendantFocusability="afterDescendants" 

then rippleView will be the last one to get the click

shinyjacklee avatar Jun 30 '15 03:06 shinyjacklee

same here, @traex can you help us ?

BriceN avatar Jul 10 '15 17:07 BriceN

@BriceN You can clone the onClickEvent. Just extend the RippleView class and add a listener to know when the ripple end.

ppamorim avatar Jul 10 '15 17:07 ppamorim