Reputation: 11
I have an activity with activity named MainActivity.java with layout file activity_main.xml in package name parent. By using data binding ActivityMainBinding is created. Now I create a new Activity with name ExtendedActivity.java that extends MainActivity.java using the same layout file in child package. ActivityMainBinding not created separately for the extended activity. How to achieve separate binding class for the extended activity with same layout ?
sample : package structure
Upvotes: 1
Views: 484
Reputation: 24907
A binding class is generated for each layout file and not for each Activity. Hence it won't create the ActivityMainBinding
separately for your different activities.
Upvotes: 2