Skip to content

Instantly share code, notes, and snippets.

@alohaabhi
Last active December 10, 2021 05:39
Show Gist options
  • Save alohaabhi/25b23c45a57014d2e4b658788c4f6b83 to your computer and use it in GitHub Desktop.
Save alohaabhi/25b23c45a57014d2e4b658788c4f6b83 to your computer and use it in GitHub Desktop.
val totalMarginForSubtitle = 2 + 16.toPx()
tvSubtitle.measure(
View.MeasureSpec.makeMeasureSpec
clContainer.width - totalMarginForSubtitle,
View.MeasureSpec. EXACTLY
),
View.MeasureSpec.UNSPECIFIED
)
val subtitleHeight = tvsubtitle.measuredHeight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment