Anko-ExpandableTextView

An expandable Android TextView written in Kotlin

View the Project on GitHub

expandable-textview / tm.charlie.expandabletextview / ExpandableTextView / collapse

collapse

@JvmOverloads fun collapse(withAnimation: Boolean = true, forceCollapse: Boolean = false): Boolean

Collapses this ExpandableTextView if its state is Expanded.

Parameters

withAnimation - should it collapse with animation or instantaneously. true by default.

forceCollapse - collapses this ExpandableTextView even if it is not in the expanded state. false by default.

Return true if ExpandableTextView started collapsing, false otherwise.