Skip to content

Instantly share code, notes, and snippets.

@Nimrodda
Created June 6, 2019 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nimrodda/6e355d5bfed875e5f7f712d4321d41be to your computer and use it in GitHub Desktop.
Save Nimrodda/6e355d5bfed875e5f7f712d4321d41be to your computer and use it in GitHub Desktop.
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)
}
}
}
}
}
}
@Mankesh71
Copy link

Hi
How onelineWithIcon this generated i am not able to get this.
Thanks,

@Mankesh71
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment