Add support for itemview multi binding variable.
See original GitHub issueHello, I am trying to use this library to bind something like the following (Similar code can be found in the https://github.com/googlesamples/android-architecture/tree/todo-databinding ) R.layout.task_item
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="task"
type="com.example.android.architecture.blueprints.todoapp.data.Task" />
<variable
name="actionHandler"
type="com.example.android.architecture.blueprints.todoapp.tasks.TasksItemActionHandler" />
</data>
...
</layout>
But it seems that itemview only accept single binding variable and I have no way to bind the TasksItemActionHandler in the adapter. It will be great that itemview can accept multi binding variables. What do you think ? Thank you.
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
How to create RecyclerView with multiple view types
Yes, it's possible. Just implement getItemViewType(), and take care of the viewType parameter in onCreateViewHolder() . So you do something like:
Read more >Using the RecyclerView | CodePath Android Cliffnotes
Manual Click Detection - ListView has a AdapterView.OnItemClickListener interface for binding to the click events for individual items in the list. In contrast, ......
Read more >Flexible RecyclerView Adapter with MVVM and Data Binding
A RecyclerView Adapter that can handle multiple item types without much boilerplate and can be reused on any screen with list content.
Read more >Xamarin.Forms Multi-Bindings - Microsoft Learn
This article explains how to attach a collection of Binding objects to a single binding target property using the MultiBinding class.
Read more >thuytrinh / binding-collection-adapter Download - JitPack
You can use multiple view types by using a ItemViewSelector instead. You can still bind it to the view with app:itemView . public...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Added in 2.0.0
Thanks for the beta version. But when I try to migrate to 2.0.0, it seems that there is something wrong with the returning type of bindExtra as shown in the pic below.
Can you check with that? Thanks!