Reputation: 1265
How/Where Can I find the generated code for ViewBinding?
whenever I try control+click/control+b to see the declaration, AndroidStudio just opens the XML layout.
Upvotes: 11
Views: 3285
Reputation: 12847
The name of the generated class for my_layout.xml
is MyLayoutBinding.java
. so you can find the implementation in MyProject/app/build/intermediates/javac/googleDebugStage/classes/you_package/databinding
Upvotes: 0
Reputation: 8638
The generate binding classes reside in app > build > generated > data_binding_base_class_source_out > debug > your app package > databinding
A you can see in the following screenshot all my ViewBinding classes for XML layout are inside the above path
Upvotes: 23
Reputation: 5714
You can use the Ctrl + Shift + N
(Go to file) to find the file with BindingImpl
suffix.
Upvotes: 1
Reputation: 189
The name of the generated class for your_layout.xml is YourLayoutBindingImpl.java. so you can find the implementation using double-shift.
Upvotes: 0