title: Android Curve Motion
body: <p>I can't correct implement moving on curve. In material design guide says, that <strong>all motion must be a downwards</strong>, but using '<strong>ArcMotion</strong>' I get downward direction if element start position is in down left corner and end position in top right position. But reverse animation (start position in top right and end position in down left position) curve has upwards direction. I found solution by using different interpolators like 'fast_out_slow_in' and 'fast_out_linear_in', but I think this not best solution. Please help me!</p>
  
  <p><a href="https://i.stack.imgur.com/ahyQW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ahyQW.jpg" alt="Enter/return animation direction"></a></p>
  
  <p><strong>============================ UPDATED ============================</strong></p>
  
  <p>Now i have two examples.</p>
  
  <p><strong>First - move object inside of view:</strong></p>
  
  <pre><code>    Interpolator slowIn = AnimationUtils.loadInterpolator(this, android.R.interpolator.linear_out_slow_in);
      Interpolator fastOut = AnimationUtils.loadInterpolator(this, android.R.interpolator.fast_out_linear_in);
  
      moveX = -view.getWidth();
      transitionY = player.getHeight() / 2;
  
  
      ObjectAnimator animationX = ObjectAnimator.ofFloat(view, View.X, moveX);
      animationX.setDuration(duration);
      animationX.setInterpolator(fastOut);
  
      ObjectAnimator animationY = ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, transitionY);
      animationY.setDuration(duration);
      animationY.setInterpolator(slowIn);
  </code></pre>
  
  <p>This peace of code for 'Return animation', for 'Enter animation' we just swaping interpolators.
  <strong>Second - shared element transition:</strong></p>
  
  <pre><code>    &lt;transitionSet xmlns:android="http://schemas.android.com/apk/res/android"
      android:duration="400"&gt;
            &lt;changeBounds/&gt;
            &lt;changeClipBounds/&gt;
            &lt;changeImageTransform/&gt;
            &lt;changeTransform/&gt;
  
            &lt;arcMotion android:minimumHorizontalAngle="50" android:minimumVerticalAngle="50"/&gt;
  &lt;/transitionSet&gt;
  </code></pre>
  
  <p>In this example I don't have control on curve direction. I can't do something like in example below(swap interpolators).</p>