If someone had a similar problem, then here is the solution I found. The difference is in the bindToGrandparent flag, which can be set to put the delegate in grandparent with an interactive view.
public static Runnable getTouchDelegateAction(final View delegate, final boolean bindToGrandparent, final int topPadding, final int bottomPadding, final int leftPadding, final int rightPadding) { return new Runnable() { @Override public void run() { View parent = (View) delegate.getParent(); View grandparent = (View) parent.getParent();
It should be used as follows:
grandparentView.post(FuncHelper.getTouchDelegateAction(ivFavorite, true, 30, 30, 30, 30));
It is important that the procedure is published for the grandparents of the submission.
or
parentView.post(FuncHelper.getTouchDelegateAction(ivFavorite, false, 30, 30, 30, 30));
source share