ExpandableLayout icon indicating copy to clipboard operation
ExpandableLayout copied to clipboard

Collapsed Layout?

Open Exerosis opened this issue 8 years ago • 8 comments

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.

Exerosis avatar May 28 '17 13:05 Exerosis

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.

cachapa avatar May 29 '17 06:05 cachapa

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.

Exerosis avatar May 29 '17 13:05 Exerosis

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.

henriquecm avatar Jun 04 '17 04:06 henriquecm

@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?

Hayk985 avatar Aug 01 '18 07:08 Hayk985

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 avatar Aug 01 '18 08:08 cachapa

@cachapa but where is the "collapsed_height" attribute, I can't see it.

Hayk985 avatar Aug 01 '18 08:08 Hayk985

@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.

Hayk985 avatar Aug 01 '18 08:08 Hayk985

@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.

cachapa avatar Aug 01 '18 11:08 cachapa