Instantly share code, notes, and snippets.

@chrisbanes chrisbanes/code.kt Secret
Last active Dec 31, 2018

What would you like to do?
/* Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0 */
fun maxLinesClickListener(view: TextView, collapsedMaxLines: Int) {
// Default to the collapsed number of max lines
view.maxLines = collapsedMaxLines
// Now set click listener which toggles between this and MAX_INT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment