Android - DataBinding - How and when the Binding classes will be generated?

后端 未结 18 1731
小蘑菇
小蘑菇 2021-02-03 16:51

DataBinding Guide States

  By default, a Binding class will be generated based on the name of the layout 
file, converting it to Pascal case and suffixing “Bindi         


        
18条回答
  •  北恋
    北恋 (楼主)
    2021-02-03 17:11

    If you don't want to restart android studio, one way is to rename activity_main.xml to something else e.g activity_m.xml and then rename it back to activity_main.xml. It is much faster than restarting android studio.

    To rename, right click on activity_main.xml and choose Refactor => Rename

提交回复
热议问题