I am using RecyclerView with StaggeredGridLayoutManager for 2 SpanCount. each item has following layout.
<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>
by default, the TextView (id/feed_caption) is not show, it will show when the item is clicked. currently, the showing will cause items nearby change spanindex, which result very complex change for the recylcerview's layout. (i am trying to add an animation).
what i want to achieve is that all items remain in its own spanindex. i searched and did not find one approach. could you please advice on anything? Thanks.
[edit] try to add animation to explain the issue.(please help to let it can be directly show on stackoverflow if possible)issue animation