Created
June 6, 2019 07:27
-
-
Save Nimrodda/6e355d5bfed875e5f7f712d4321d41be to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class GamesListController : TypedEpoxyController<Container>() { | |
override fun buildModels(container: Container?) { | |
container?.genres?.forEach { | |
header { | |
id(it.header.id) | |
genre(it.genre) | |
onHeaderExpanded { model, _, _, _ -> | |
container.onGenreExpanded(model.genre()) | |
} | |
} | |
if (it.genre.isExpanded) { | |
it.games.forEach { game -> | |
onelineWithIcon { | |
id(game.id) | |
game(game) | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got the header for expandable list but unable to get item inside the header.
As i am not sure about onelineWithIcon in controller.
Can you please help me out.
Thanks in advance.