Android Data Binding using include tag

前端 未结 5 876
迷失自我
迷失自我 2020-11-28 04:11

Update note:

The above example works properly, because release 1.0-rc4 fixed the issue of needing the unnecessary variable.

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-28 04:37

    just set an id for your include layout

        
    

    then

    BUTTONSBINDING binding = yourMainBinding.layout;
    

    BUTTONSBINDING is res/layout/buttons.xml

    now :

    binding.button.setText("simple_Way");
    

提交回复
热议问题