Skip to content

Instantly share code, notes, and snippets.

@fluxtah
Created January 20, 2020 15:21
Show Gist options
  • Save fluxtah/7203569f4ced1b52ce77bdfc9eb4410a to your computer and use it in GitHub Desktop.
Save fluxtah/7203569f4ced1b52ce77bdfc9eb4410a to your computer and use it in GitHub Desktop.
recyclerView.withJubako(this).load(SimpleJubakoAssembler {
for (i in 0..100) {
add(object : ContentDescriptionProvider<Any> {
override fun createDescription(): ContentDescription<Any> {
return ContentDescription(
viewHolderFactory = viewHolderFactory {
object : JubakoViewHolder<Any>(textView("Hello Jubako!")) {
override fun bind(data: Any?) {}
}
},
data = EmptyLiveData()
)
}
})
add(object : ContentDescriptionProvider<Any> {
override fun createDescription(): ContentDescription<Any> {
return ContentDescription(
viewHolderFactory = viewHolderFactory {
object : JubakoViewHolder<Any>(textView("こんにちはジュバコ")) {
override fun bind(data: Any?) {}
}
},
data = EmptyLiveData()
)
}
})
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment