Last active
November 20, 2016 20:14
-
-
Save Dima564/b294432156c44da7daf44c512c6af87a to your computer and use it in GitHub Desktop.
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
items = StoreInfo().apply { storeItems = fetchItems() }.let { manager.process(it) } | |
container.apply { | |
removeAllViews() | |
items.forEach { addView(ShopItemView(context).withData(it)) } | |
} | |
fun ShopItemView.withData(item: StoreItem): ShopItemView { | |
title = item.title | |
image = item.image | |
Brand.findById(item.id)?.let { brandName = it.name } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment