I want to enable Android View Binding but just for certain XML files. If I enable ViewBinding in the project then the entire XML files are parsed and converted to code, as I have a very large number of XML files, it would increase build times and apk size quite a lot I suppose. Also disabling binding in every file XML is tedious! Is there an option to activate ViewBinding and then enable it in the files we want?
Thanks
This isn't possible with View Binding, you would have to use Data Binding for this which has all the goodies of View Binding but only applies to layouts you give the tag to.
Not entirely sure if this is 100% a solution for you but here's a link! https://developer.android.com/topic/libraries/data-binding