Is there a shortcut / quick way of opening the sources of Android SDK classes in Android Studio without using a reference in code of the class looked for?
When you start typing a class name in code you can auto-complete it and when you use
CTRL+B
(go to definition) on the name it opens the corresponding source file.However, when you want to look at a class currently not in your code you cannot use this shortcut. As a workaround, I type the class name in some source file just to use the go-to-definition shortcut and then remove it again. This is of course not nice and could be faster.
Other questions like How to browse android SDK sources in Android studio 2.0 only seem to be about making Android Studio aware of the SDK sources in general.
In general with IntelliJ
As pointed out by Enzokie, this problem might apply to IntelliJ in general.
The question then generalises to whether one can conveniently open source files the IDE "is aware of" (such as SDKs, libraries). In the case of the Android SDK there is a separate settings entry under Settings -> System settings -> Android SDK
which makes Android Studio "aware" of the SDK (and its source location). I am not sure whether the IDE is aware of other sources in the same way, when the sources are being made aware with a different setting.