Skip to content

Instantly share code, notes, and snippets.

@wangerekaharun
Created August 20, 2019 20:41
Show Gist options
  • Select an option

  • Save wangerekaharun/6392626fe1d45bd0f635a0594f418e3f to your computer and use it in GitHub Desktop.

Select an option

Save wangerekaharun/6392626fe1d45bd0f635a0594f418e3f to your computer and use it in GitHub Desktop.
.takeIf { it.size > 0 }
?.firstOrNull()
?.run {
(0 until childCount).map { x ->
getChild(x)
}.filter {
it != null && it.text != null
&& it.className.contains("Name")
&& FixTitleUtils.shouldFixTitle(it.text.toString())
}.map {
val text = it.text
it.recycle()
text
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment