I'm entering a new codebase and have to understand how it works. There's a BR file that's autogenerated. I think it comes from the Data Binding Library. That BR files contains a lot of values, but I see no way to automatically search for the area in the code from where the content of that file gets specified.
When I have for example:
public static final int currentDate = 35;
public static final int currentEmail = 36;
How do I lookup where the code that results in those variables existing originates?
I see no way to automatically search for the area in the code from where the content of that file gets specified.
First of all, BR file is auto generated which will not let you know where from the fields generated. Same like you can not search R fields, where they belong to.
But there are normally two types of fields generated in BR file.
1st is <variable
defined in your layout.
<variable
name="model"
type="sample.data.Model"/>
2nd is @Bindable
fields.
@Bindable
public String getPassword() {
return password;
}
So BR file look like
public class BR {
public static final int _all = 0;
public static final int model = 0;
public static final int password = 1;
}
_all
is some default integer which always gets generated.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments