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?
14 Answers
The easiest and the most straightforward way:
To activate: menu File → Settings → Editor → General
For Mac OS X, Android Studio → Preferences → Editor → General and check Show quick documentation on mouse move:
Other ways:
You can go into your IntelliJ IDEA's bin folder and search for idea.properties. Add this line to the document:
auto.show.quick.doc=true
Now you'll have the same floating documentation window like in Eclipse.
- You have to press Ctrl + Q to see the Javadoc.
You can pin the window and make the documentation appear every time you select a method with your mouse though.
Android Studio 1.0: You have to hold Ctrl if you want to get hold of the documentation window, for example, scrolling documentation. Otherwise, as you move your mouse away from the method, the documentation window will disappear.
It comes very handy if you create a keymap for functionalities you use very frequently. By default (if you select an OS X v10.5 (Leopard) and later keymap):
- Ctrl + P: To see what parameters are expected by the function
- Command + J: To see the documentation
- Ctrl + Space: To see the autocomplete suggestions
Android Studio 2.x.x
Moved under menu 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 menu 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, etc.
Many of the other answers are all well, but if you want an informational tooltip instead of a full-blown 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.