Created
January 28, 2018 12:30
-
-
Save abdurahmanadilovic/53cc609074f78dc207dd2866ada5e5ae to your computer and use it in GitHub Desktop.
Kotlin map example 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val rootView = LinearLayout(testContext) | |
listOfLinks.map { | |
val tmpTextView = TextView(testContext) | |
tmpTextView.text = it | |
tmpTextView | |
}.forEach { | |
rootView.addView(it) | |
} | |
assertEquals(listOfLinks[0], (rootView.getChildAt(0) as TextView).text.toString()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment