RecyclerView with ItemTouchHelper only part swipeable
<p>I have a recyclerview list with items like this:</p>

<p><a href="https://i.stack.imgur.com/HxXav.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HxXav.jpg" alt="list item"></a></p>

<p>The red square <strong>only</strong> can we swiped (drag and drop out) to the left, and the green <strong>only</strong> can we swiped to the right.  When the element is swiped, appear and image with a option like this:</p>

<p>-swipe left:</p>

<p><a href="https://i.stack.imgur.com/toB1q.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/toB1q.jpg" alt="swipe left"></a></p>

<p>-swipe right:
<a href="https://i.stack.imgur.com/QloU8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QloU8.jpg" alt="swipe right"></a></p>

<p>The layout item have this appearance:</p>

<pre><code>&lt;RelativeLayout&gt;
   &lt;LinearLayout&gt;
      &lt;ImageView/&gt; //Red square
      &lt;ImageView/&gt;  //Green square
   &lt;/LinearLayout&gt;
   &lt;LinearLayout&gt;
      &lt;ImageView/&gt;  //Red square swiped action
      &lt;ImageView/&gt;  //Green square swiped action
   &lt;/LinearLayout&gt;
&lt;/RelativeLayout&gt;
</code></pre>

<p>I'm trying to do this with <code>ItemTouchHelper.Callback</code> and overriding the method <code>onChildDraw</code> to make the correct animation. But I can't hold with square has be swiped, and make the correct animation.
¿Another way to achieve this? </p>