How do I see with Android Studio from where the generated code in a BR file originates?

Christian

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?

Khemraj

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Where can I see the code generated by Android Data Binding Library?

From Dev

How do I link an object file generated from C code, a static library and a NASM generated object file?

From Dev

Where do I see printed stack trace in Android Studio?

From Dev

Where can I see the generated class file for my java source code in Domino Designer?

From Dev

How can I see where exactly exception occurred in Android Studio?

From Dev

Using Logcat to find where the line of code originates from

From Dev

How do I get Android Studio to stop returning generated code in search results?

From Dev

How to find out where a class originates from at runtime?

From Dev

How to find out where a class originates from at runtime?

From Dev

How do I see where a folder was copied from?

From Dev

How can i see the xml Drawerlayout file on android studio

From Dev

How do I see Gradle Warnings on Android Studio?

From Dev

How do I change the constructor code in SWIG generated CSHARP file

From Dev

How do I change the constructor code in SWIG generated CSHARP file

From Dev

How do I see error messages generated in PowerShell event handlers?

From Dev

Where I can see all the methods of a class in Android studio?

From Dev

Where can I print out logs to see immediately in Android Studio?

From Java

How can I see 'git diff' on the Visual Studio Code side-by-side file?

From Dev

PDE development: How to find out where a plugin from my target platform originates from?

From Dev

How do I use a class from an imported jar file in Android Studio

From Dev

How to publish an Android app from Android-Studio using a Keystore file generated in Eclipse?

From Dev

How do I add nl2br and htmlentities in this code

From Dev

How do I open a Windows Application ".exe" file in Visual Basic to see the code?

From Dev

Can I create own auto generated code in Android Studio IDE?

From Dev

How do I get Android Studio to include resources in a .jar file?

From Dev

How do I navigate to the start or end of a file in Android Studio?

From Dev

How do i create a key store file in android studio?

From Dev

Android Studio: I accidentally deleted my app.iml file from my project, how do I add it

From Dev

From where do I import settings from previous version of Android Studio?

Related Related

  1. 1

    Where can I see the code generated by Android Data Binding Library?

  2. 2

    How do I link an object file generated from C code, a static library and a NASM generated object file?

  3. 3

    Where do I see printed stack trace in Android Studio?

  4. 4

    Where can I see the generated class file for my java source code in Domino Designer?

  5. 5

    How can I see where exactly exception occurred in Android Studio?

  6. 6

    Using Logcat to find where the line of code originates from

  7. 7

    How do I get Android Studio to stop returning generated code in search results?

  8. 8

    How to find out where a class originates from at runtime?

  9. 9

    How to find out where a class originates from at runtime?

  10. 10

    How do I see where a folder was copied from?

  11. 11

    How can i see the xml Drawerlayout file on android studio

  12. 12

    How do I see Gradle Warnings on Android Studio?

  13. 13

    How do I change the constructor code in SWIG generated CSHARP file

  14. 14

    How do I change the constructor code in SWIG generated CSHARP file

  15. 15

    How do I see error messages generated in PowerShell event handlers?

  16. 16

    Where I can see all the methods of a class in Android studio?

  17. 17

    Where can I print out logs to see immediately in Android Studio?

  18. 18

    How can I see 'git diff' on the Visual Studio Code side-by-side file?

  19. 19

    PDE development: How to find out where a plugin from my target platform originates from?

  20. 20

    How do I use a class from an imported jar file in Android Studio

  21. 21

    How to publish an Android app from Android-Studio using a Keystore file generated in Eclipse?

  22. 22

    How do I add nl2br and htmlentities in this code

  23. 23

    How do I open a Windows Application ".exe" file in Visual Basic to see the code?

  24. 24

    Can I create own auto generated code in Android Studio IDE?

  25. 25

    How do I get Android Studio to include resources in a .jar file?

  26. 26

    How do I navigate to the start or end of a file in Android Studio?

  27. 27

    How do i create a key store file in android studio?

  28. 28

    Android Studio: I accidentally deleted my app.iml file from my project, how do I add it

  29. 29

    From where do I import settings from previous version of Android Studio?

HotTag

Archive