Original title: What hotkey, if any, is to navigate to the layout file or resource value?
(This question did not actually describe the problem. And, as you can imagine, this attracted some obvious answers. My apologies, this is the first question I posted.)
I am using Android Studio version 1.1.0 on Mac.
Let's say I have a line of code like this:
setContentView(R.layout.layout_main);
In Eclipse, I can simply use the + click command in the resource identifier and it will go to the corresponding xml file and then highlight the line, view or color declaration. However, this is done in Android Studio, which translates me into a declaration in the R file That is completely useless.
Is there a separate hotkey that I missed, or a separate event / action to which I could bind the current hotkey to make AS work like Eclipse this way?
EDIT
After a couple of answers that were correct according to the original question - and some experiments (created a new new project - I feel stupid that I didnโt do this before), it seems that Android Studio should actually go to the exact line in xml. where a View, String, or Color object is declared, as Eclipse does. However, in my situation this is not for some odd reason.
This is just speculation, but I believe that the culprit may be one or a combination of three things:
- The project I was working on was recently migrated from an Eclipse project to an Android Studio project. This seems most likely, as the problem persists after updating points 2 and 3.
- JDK version. When I created a new project, AS complained that my compiler was deprecated (1.6 works, upgraded to 1.7).
- Target SDK is the reason I was asked to update the JDK.