Are there any experts in databinding? I've read all articles that I've 
found but haven't find an answer...

For example I have next layout:

<layout xmlns:android="http://schemas.android.com/apk/res/android";>
    <data>
        <variable
            name="focusChangeListener"
            type="android.view.View.OnFocusChangeListener" />
    </data>

    <EditText
        android:id="@+id/entry"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:onFocusChange="@{focusChangeListener}"/>
</layout>


And I want to include it into another one like that : 

<layout xmlns:android="http://schemas.android.com/apk/res/android";
    xmlns:bind="http://schemas.android.com/apk/res-auto";>
    <data>
        <variable
            name="listener"
            
type="com.netpulse.mobile.register.view.actionlisteners.EmailFieldActionListener"
 />
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <include layout="@layout/edittext"
            bind:focusChangeListener="@{(v,hasFocus) -> 
listener.onEmailFocusChanged(hasFocus)}"/>

    </LinearLayout>
</layout>


But construction like (v,hasFocus) -> listener.onEmailFocusChanged(hasFocus)  
doesn't work inside <include>. 
I want to receive something similar to 
that 
https://github.com/googlesamples/android-architecture/blob/todo-databinding/todoapp/app/src/main/res/layout/taskdetail_frag.xml#L74
 
but for <include>

Is there any way to do something with that? 





























-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/2b4b2045-4902-40f9-a6c1-6c441f1712b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to