Open IstrateAndrei opened 3 years ago
Hi, a new version 1.0.7
has been released.
Please try using a new release. Thanks!
Hi, a new version
1.0.7
has been released. Please try using a new release. Thanks!
I faced this issue in version 1.0.7. When using recyelerView in secondLayout
I'm having the same problem, is there any solution?
@skydoves This is still a problem. I tried to fix this and just couldn't find the reason why it works in your demo but not in my app. I discoverd that this is caused when the layout height is changed because it's content changed.
To reproduce this just adjust this line in your demo MainActivity to change the text and make it larger dynamically:
expandable1.setOnExpandListener {
if (it) {
toast("expanded")
expandable1.secondLayout.findViewById<TextView>(R.id.textView).text = "${getString(R.string.text_stars)}${getString(R.string.text_stars)}${getString(R.string.text_stars)}"
} else {
toast("collapse")
expandable1.secondLayout.findViewById<TextView>(R.id.textView).text = "${getString(R.string.text_stars)}${getString(R.string.text_stars)}${getString(R.string.text_stars)}"
}
}
I faced this issue the same issue. after the Expandable layout is created and I set the text to the text view in the (second layout) is not displayed entirely, I needed to find a quick fix so I have done the following:
app:expandable_secondLayout="@layout/expandable_second"
) from the XML layout.binding.myExpandableLayout.secondLayoutResource = R.layout.expandable_second
)binding.myExpandableLayout.secondLayout.findViewById<TextView>(R.id.expandableDescription).text = longDescription
)*Note: if there is an image view with an image in it or a text view with text in it in the XML layouts it will redraw above it again
Hi, a new version
1.0.7
has been released. Please try using a new release. Thanks!I faced this issue in version 1.0.7. When using recyelerView in secondLayout
I'm having the same problem using 1.0.7 version
I faced this issue the same issue. after the Expandable layout is created and I set the text to the text view in the (second layout) is not displayed entirely, I needed to find a quick fix so I have done the following:
- Removed (
app:expandable_secondLayout="@layout/expandable_second"
) from the XML layout.- Pass the (second layout) right before setting the text to its component (
binding.myExpandableLayout.secondLayoutResource = R.layout.expandable_second
)- Set the data (
binding.myExpandableLayout.secondLayout.findViewById<TextView>(R.id.expandableDescription).text = longDescription
)*Note: if there is an image view with an image in it or a text view with text in it in the XML layouts it will redraw above it again
OH MY ***ING LIFE. THANKS A LOT. I have faced same issue, but i was summarize all textview lines and multiplied it on some constant and after this reindicated layoutParams for secondLayout and it some how a little bit fixed my issues! Thank you @abedsako
Library Version v1.0.6
The layout set as
secondLayout
is not displayed entirely. It hasandroid:layout_height="match_parent"
but theExpandableLayout
doesn't take in the full size of the layout file.I'd expect to have the second layout fully displayed. The
ExpandableLayout
should take the addedheight
of it's parent and second layout when expanded. Right now I see it's a fixed size and I have to include aScrollView
as a workaround