Antonis Radz
Antonis Radz

Reputation: 3097

Android databinding variable list with Any type

maybe someone knows how to add List<Any> or List<*> variable in databinding with any type?

When type is known it is done like this:

<data>

    <import type="java.util.List" />

    <variable
        name="list"
        type="List&lt;String>" />
</data>

Upvotes: 2

Views: 1894

Answers (1)

Antonis Radz
Antonis Radz

Reputation: 3097

answering my own question:

 <data>

        <import type="java.util.List" />

        <variable
            name="list"
            type="List&lt;Object>" />
    </data>

Key is using Object

Upvotes: 4

Related Questions