ExpandableLayout
ExpandableLayout copied to clipboard
Collapsed Layout?
It would be really helpful to support a collapsed layout as well for situations where you want to show some content, then expand to show more. In my case the description of an article.
Do you mean showing a bit of the layout in the collapsed state? I guess that would be possible by configuring the collapsed size, but honestly I struggle to find a common use case for it.
I'll leave this issue open for now.
Yes, I think it could be helpful for anyone looking to have a preview of something(image, text, comments in a list, etc). Something similar to a minHeight would be really useful! Thanks for considering.
I've done was like this:
<LinearLayout>//root
<LinearLayout/>//child
<net.cachapa.expandablelayout.ExpandableLayout/>
</LinearLayout>
Then i created a view with a listener inside Linear Layout Child that can toggle the expandable layout.
@cachapa you're closing the issue, but how to fix it? I see you have this problem very long time, so you haven't found a solution yet yes?
This issue is still open. I closed the one you created because it's a duplicate of this one.
The solution would be implementing a "collapsed_height" attribute, but that would be hard to make dynamic, i.e. just showing a line of text, since it would require looking at the line height.
@cachapa but where is the "collapsed_height" attribute, I can't see it.
@cachapa https://github.com/AAkira/ExpandableLayout . in this library there is a method expandableLayout.setClosePosition(int value); and that is doing what I need, but the library not works good, I had some problems using this library, because I'm using your library. So you can see how he does the collapsed state part, when some part is visible.
@Hayko985 please read my message. The "collapsed_height" attribute doesn't exist yet, all I said is it would be a possible solution for the issue.
If someone wants to implement it, I'll gladly accept it. Otherwise you need to wait until I have the time to do it myself.