AAkira / ExpandableLayout

[Deprecated] An android library that brings the expandable layout with various animation. You can include optional contents and use everywhere.
Apache License 2.0
1.65k stars 325 forks source link

ExpandableLinearLayout & ExpandableRelativeLayout height issue when recycling item in RecyclerView #71

Open Shusshu opened 8 years ago

Shusshu commented 8 years ago

When scrolling a list with a lot of elements I expand one ExpandableLinearLayout then scroll again to another element where ExpandableLinearLayout is supposed to expand even more, but sadly it's reusing the same view and does not expand fully.

How can I force a new height calculation?

fsw0422 commented 8 years ago

I am also having the same problem. the TextView inside cannot be seen 100%

suntao2yl commented 8 years ago

i'm having the same problem too. any good idea?

AAkira commented 8 years ago

@Shusshu @fsw0422 @suntao2yl

I'm sorry for the delay fixed this issue. This problem is fixed in #87.

You have to set holder.expandableLayout.setInRecyclerView(true); and holder.setIsRecyclable(false); if it's used in recycler view. But a recycler view isn't recycled if you set a holder.setIsRecyclable(false);.

kyaw-san-oo commented 6 years ago

According to #87, I set holder.expandableLayout.setInRecyclerView(true); in my recycler view adapter but the ExpandableLinearLayout cannot wrap the contents fully when expand. How can I fix please?

hshahdoost commented 6 years ago

How come this is not implemented in ExpandableRelativeLayout?