-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Kiel] Support for nested recyclerview #63
Comments
Hi @rainboy93, Thanks for your question. When we check for example this is kind of nested recycler view example: val recyclerViewAdapter = adapterOf<MessageViewState> {
register(
layoutResource = R.layout.adapter_message_text_item,
viewHolder = ::TextMessageViewHolder,
onBindViewHolder = { vh, _, text ->
vh.messageText.text = text.text
vh.sentAt.text = text.sentAt
}
)
register(
layoutResource = R.layout.adapter_message_image_item,
viewHolder = ::ImageMessageViewHolder,
onBindViewHolder = { vh, _, item ->
vh.messageText.text = item.text
vh.sentAt.text = item.sentAt
Glide.with(vh.messageImage)
.load(item.imageUrl)
.into(vh.messageImage)
}
)
register(
layoutResource = R.layout.adapter_message_poll_item,
viewHolder = ::PollMessageViewHolder,
onBindViewHolder = { vh, _, poll ->
vh.pollTitle.text = poll.text
vh.sentAt.text = poll.sentAt
val pollOptionsAdapter = adapterOf<PollOption> {
register(
layoutResource = R.layout.adapter_poll_option_item,
viewHolder = ::PollOptionViewHolder,
onBindViewHolder = { pollOptionViewHolder, _, pollOption ->
pollOptionViewHolder.pollOption.text = pollOption.text
}
)
}
vh.pollOptionsRecyclerView.adapter = pollOptionsAdapter
pollOptionsAdapter.submitList(poll.options)
}
)
} What do you think? If you want, you can implement an simple example looks like Google Play and open PR. Sincerely |
i will try it and share it with you @ibrahimyilmaz |
@ibrahimyilmaz sorry for late response. |
@ibrahimyilmaz I just make a PR for nested horizontal list example. Brgs, |
Hi @ibrahimyilmaz,
There is a common case that we will have a child list of items as a row of recyclerview just like Google Play did.
Is there any solution for this case in Kiel?
The text was updated successfully, but these errors were encountered: