Original Title: What is the hotkey, if any, for navigating to layout file or a resource's value?
(This question didn't really describe the issue at hand. And as you can imagine, it attracted some obvious answers. My apologies, this is the first question I've posted.)
I'm using Android Studio version 1.1.0 on Mac.
Say I have a line of code similar to this:
setContentView(R.layout.layout_main);
In Eclipse, I could simply use 'command + click' on the resource ID and it would navigate to the respective xml file then highlight the string, view, or color declaration. However, doing so in Android Studio navigates me to the declaration within the R file, which is utterly useless.
Is there a separate hotkey that I missed, or a separate event/action I could bind the current hotkey to, that would cause AS to operate more like Eclipse in this manner?
EDIT
After a couple answers -- which were correct according to the original question -- and some experimentation (created a fresh new project - I feel silly for not doing that earlier), it seems Android Studio should in fact navigate to the exact line in the xml where the View, String, or Color resource is declared, just like Eclipse does. However in my situation, it isn't for some odd reason.
This is merely speculation, but I suppose the culprit could be one or a combination of three things:
- The project I was working on - It was recently migrated from an Eclipse project to Android Studio project. This seems to be the most likely since the issue persists after updating items 2 and 3.
- The JDK version - When I created the new project, AS complained that my compiler was outdated (was running 1.6, upgraded to 1.7).
- Target SDK - the reason I was prompted to upgrade the JDK.