Skip to content

Instantly share code, notes, and snippets.

@alohaabhi
Last active December 10, 2021 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alohaabhi/593814ba76195885c6f64d2f0201f18c to your computer and use it in GitHub Desktop.
Save alohaabhi/593814ba76195885c6f64d2f0201f18c to your computer and use it in GitHub Desktop.
private fun showSubtitle() {
//TODO measure the view
val subtitleHeight = tvSubtitle.measuredHeight
tvSubtitle.height = 0
tvsubtitle.isVisible = true
val heightAnimator = ValueAnimator.of Int(0, subtitleHeight)
heightAnimator.addUpdateListener {
tvSubtitle.updateHeight(it.animatedValue as Int)
}
heightAnimator.start().
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment