2 SpanCount の StaggeredGridLayoutManager で RecyclerView を使用しています。各項目は以下のレイアウトになっています。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/feed_item_margin_bottom"
android:layout_marginTop="@dimen/feed_item_margin_top"
android:background="#ffffff"
android:orientation="vertical" >
<ImageView
android:id="@+id/feed_photo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:src="@drawable/camera" />
<TextView
android:id="@+id/feed_caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/feed_item_text_margin_left"
android:layout_marginTop="@dimen/feed_item_text_margin_top"
android:text="TextView"
android:textColor="@color/color_primary_dark"
android:visibility="gone" />
</LinearLayout>
デフォルトでは、TextView (id/feed_caption) は表示されません。項目をクリックすると表示されます。現在、表示によって近くのアイテムがスパンインデックスを変更し、recyclerview のレイアウトが非常に複雑に変更されます。(アニメーションを追加しようとしています)。
私が達成したいのは、すべてのアイテムが独自のスパンインデックスに残ることです。私は検索しましたが、1つのアプローチが見つかりませんでした。何かアドバイスをお願いできますか?ありがとう。
[編集]問題を説明するためにアニメーションを追加してみてください (可能であれば、stackoverflow で直接表示できるようにしてください)