question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for itemview multi binding variable.

See original GitHub issue

Hello, 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:closed
  • Created 7 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
evantcommented, Mar 8, 2017

Added in 2.0.0

1reaction
lowworcommented, Aug 6, 2016

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. screencapture at sat aug 6 23 08 14 cst 2016 Can you check with that? Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found