Cannot refer to other View ID in Android data binding

前端 未结 1 1124
再見小時候
再見小時候 2020-12-10 01:13

I just finished watching Advanced Data Binding - Google I/O 2016 and would like to apply the following to reduce repetition of my expression used in different views.

相关标签:
1条回答
  • 2020-12-10 01:32

    The binding process converts your IDs to properties in the binding class, and the generated names are camel-casified.

    You may need to change the following line:

    android:visibility="@{btn_list.visibility}"/>
    

    To this:

    android:visibility="@{btnList.visibility}"/>
    
    0 讨论(0)
提交回复
热议问题