I know RecyclerView animates item additions/deletions for us for free. Is it supposed to support animating item height changes as well?
For example : Consider a row item with the following xml :-
<LineaLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="@+id/tv1" />
<TextView android:id="@+id/tv2" android:visibility="gone" />
</LinearLayout>
If I set "tv2" visibility to View.VISIBLE, the row height changes without any animation.
I've seen a few approaches of attempting to run your own ValueAnimator on the view itself, but my understanding is that it is
(1) not efficient
(2) you shouldn't run animations directly on the views themselves as they may get recycled from user interaction while the animation is running.