How to set Android DataBinding in nested layouts

前端 未结 2 1278
栀梦
栀梦 2021-02-07 21:14

I was just reading about data binding feature in android. I was trying to bind a view from a nested layout. My activity is android\'s default template of DrawerMenuActivit

2条回答
  •  甜味超标
    2021-02-07 21:34

    One can pass the objects in XML ... the xmlns:bind namespace is required (similar to xmlns:app).

    
    
        
       
           
       
    
       
    
           
    
           
    
       
    
    
    

    source of the example: Layouts and binding expressions.

提交回复
热议问题