In Eclipse, when you hover your mouse over a method, a window would appear with a description of what the method does, what the parameters mean and what it returns. Is there a way to get Android Studio to do the same thing?
This question is related to
android-studio
android-view
Yes, you can. Go to File -> Settings -> Editor -> Show quick documentation on mouse move
Or, in Mac OS X, go to Android Studio - > Preferences -> Editor - > General > Show quick documentation on mouse move
.
If you need only Parameter info then:
On Mac, it's assigned to Command+P
On Windows, it's assigned to Ctrl+P
If you need document info then:
On Mac, it's assigned to Command+Q
On Windows, it's assigned to Ctrl+Q
Android Studio 2.x.x
Moved under Editor -> General
Older Versions
Using windows 7 and Android Studio 1.0.x it took me a while to figure out the steps provided in the answer.
To help further visitors save some time, here is the way I did it:
Go to File -> Settings or press CTRL+ALT+S.
The following window will open and check Show quick doc on mouse move
under IDE Settings -> Editor.
Or just press CTRL and hover your move over your method, class ...
Go to Preference->Editor->General
and choose show quick doc on mouse hover
Macbook: ?J or fnF1 does the same.
Also, use the one from the editor definition as explained above.
On Mac the default key combination for showing the quick documentation is: CTRL + F1
The cursor has to be on the method when using this.
On my Mac, CtrlF1 stopped working, but F1 on its own works.
Android Studio 1.2.2 has moved the setting into the General
subfolder of Editor settings.
Many of the other answers are all well but if you want an informational tooltip instead of a fullblown window then do this: after enabling it using @Ahmad's answer then click on the little pin on the upper right corner:
After this the method information will appear on a tooltip like almost every other mainstream IDE.
If you just need a shortcut, then it is Ctrl + Q on Linux (and Windows). Just hover the mouse on the method and press Ctrl + Q to see the doc.
Source: Stackoverflow.com