RecyclerView: Animate item resize

后端 未结 2 1067
逝去的感伤
逝去的感伤 2021-02-02 12:38

I have a RecyclerView. Each of its items of the recycler view can be either expanded or not. There can be only one item expanded at the same time.

In essenc

2条回答
  •  迷失自我
    2021-02-02 13:03

    You should just use notifyItemChanged(getPosition(), new Object()) instead.

    In your adapter, override onBindViewHolder(GigExtraViewHolder holder, int position, List payloads) , if payloads is null or empty do your original bind logics, else, just do your own expand/collapse animation.

    提交回复
    热议问题