cachapa / ExpandableLayout

An expandable layout container for Android
Apache License 2.0
2.34k stars 273 forks source link

Is it possible to collapse when click on "expanded" content #24

Closed hasancse91 closed 7 years ago

hasancse91 commented 7 years ago

I'm using RecyclerView. When I click on an Item the content (Relative Layout) is expanded well. To collapse this expanded content I have to click on Item.

Is it possible to collapse the expanded content after clicking on it (in my case click on a Relative Layout).

Thank you for making this awesome library. <3

cachapa commented 7 years ago

Sure, you just need to call ExpandableLayout.collapse(), it doesn't really matter where you're calling it from. In your case you just need to set a click listener on your content.

hasancse91 commented 7 years ago

Thank you for your rapid response. :+1:

My problem is solved.