Q:

Switch between reference and value preview of string resources in the xml editor

when working in Android Studio in xml values and referencing to @Strings/xy for instance, I have seen in a video, that it is actually possible to display the actual values directly in the same editor window. It was basically a switch to between @String/xy and "XYContent", but with the reference still existing.
I am not referencing to "ctrl+click" which opens (in my case) the strings.xml in a new tab.
Any idea? Couldn't find any reference to this in the help file.

A:

Click and bring the cursor to the string resource reference and press Ctrl+- (Cmd for Mac, minus/hyphen) and you'll see the preview.
It basically does a collapse all for the code and collapsed string resource references show the values as preview. Collapse all action can also be done from the menu if you are comfortable with mouse more than keyboard. Right-Click -> Folding > Collapse
To switch back press Ctrl++ (Cmd for Mac) with the cursor still on same reference.

A:

You can go to Preferences => Appearance & Behavior => Editor => General => Code Folding and enable Android String References to always see the value of string resource in the java file.

