How can I find XML files from R.id or R.layout in Android?

I use Eclipse to learn some open source projects on Android. I save R.id.xxx or R.layout.xxx in the Java source code . And I see that they are built from XML files in a folder /res.

But the problem is that there are hundreds of XML files that may contain the identifier that I want to see. Is there a way to see this link, and not view each XML file manually?

Thanks in advance.

+5
source share
5 answers

just hold the ctrl key and place the mouse over R.id.xxx or R.layout.xxxxx. Eclipse will show the parameter as

      open Declaration
      open Declaration in Layout/xxxx.xml

/xxx.xml, . , ​​ R.java

, .

+12

R.layout - R.id - , .

, , - .

, R.layout, R.id .

: xml Android?

, "" , (, editText, TextViews ..) .

Ctrl, , .

+3

...

1. R.java,

2. ctrl

3. , xml .

4. " _"

+2

R.java gen (XML ) "layout". , .

  • Ctrl .
  • R.layout.XXX
  • "Open Declaration".
  • , , R.java
0

(1) just hold down the ctrl key and move the mouse over R.id.xxx. Eclipse will display this option as

  open Declaration
  open Declaration in Layout/abc.xml

(2) By clicking on the open declaration in the layout /abc.xml, it will lead to the layout file. If you choose an open declaration, it will be sent to part of the declaration in R.java

Hope this helps you.

0
source

All Articles