title: RecyclerView scrollToPositionWithOffset with animation
body: <p>Im trying to animate a card view's position and resize it to fit screen at the same time. 
  When the user clicks a button inside the cardview, the cardview should expand to the size of its container, and scroll up to become fully visible at the same time</p>
  
  <p>in my custom animator class, im using the following function:</p>
  
  <pre><code>    @Override
      protected void applyTransformation(float interpolatedTimeTransformation t) {
      int newHeight = (int) (startHeight + (targetHeight - startHeight) *interpolatedTime);
  
      view.getLayoutParams().height   = newHeight;
      ((LinearLayoutManager) MainPage.mainGroupRecycler.getLayoutManager()).scrollToPositionWithOffset(MainPage.mainGroupRecycler.getChildAdapterPosition((CardView) view.getParent()), 0);
  
      view.requestLayout();
      }
  </code></pre>
  
  <p>in the following case, the recyclerview instantly shows the cardview at the top of the visible area without animating the scrolling, then it animates the resize. I need it to scroll at the same time the resize is happening.</p>
  
  <p>i tried calling another scroll function:</p>
  
  <pre><code>           MainPage.mainGroupRecycler.scrollToPosition(MainPage.mainGroupRecycler.getChildAdapterPosition((CardView) view.getParent()));
  </code></pre>
  
  <p>But the problem with this is that the scrolling will only animate after the resize is complete. </p>
  
  <p>I need the resizing and the scrolling to happen simultaneously.</p>
  
  <p>Any help will be appreciated</p>