-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Just use on section but multi layout #5
Comments
Hi, @fjr619 class SampleAdapter0(private val delegate: SampleViewHolder.Delegate) : BaseAdapter() {
private val section_item = 0
init {
addSection(ArrayList<SampleItem>())
}
fun addItems(sampleItems: List<SampleItem>) {
addItemsOnSection(section_item, sampleItems)
notifyDataSetChanged()
}
override fun layout(sectionRow: SectionRow): Int {
// if the sectionRow.row % 2 == 0, returns view_even.xml
// else return view_odd.xml
}
override fun viewHolder(layout: Int, view: View): BaseViewHolder {
return SampleViewHolder(view, delegate)
}
} |
what is different between I tried :
but when i tried to log |
Next question how to remove item? sorry for too much question, because this libs is good and want to maximize the usage in my project |
How to make just use 1 section like in example, but with multi layout child. example if position is even then use view_even.xml, and if position is odd then use view_odd.xml ? thank you
The text was updated successfully, but these errors were encountered: