Hey guys, want to share a project I've been workin...
# android
j
Hey guys, want to share a project I've been working on - MonoAdapter Leverage on ViewBinding, we can create a single viewType adapter like this:
Copy code
val adapter = MonoAdapter.create<AdapterMyDataBinding, MyData> {
    textView.text = it.text1
    button.setOnClickListener {
        textView.text = it.text2
    }
}
Just define how the binding should work with your data object and that's it. The lib will do the rest for you, I think it's quite useful for simple use case in you app. Let me know if you have any comment. Thanks!! (also work without ViewBinding btw) https://github.com/carousell/MonoAdapter