574
votes

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
There is a faster, much more convenient approach. Just press ctrl + space (Mac OS X) when your cursor is over a method. It will open up a small dialog window with the documentations.ChallengeAccepted
Ctrl+Q is the way to go.live-love
On Catalina (at least) ⌘ + SPACE is reserved for the system's Spotlight Search. However, ⌥ + SPACE works fineMaciej Beimcik

14 Answers

957
votes

The easiest and the most straightforward way:

To activate: menu FileSettingsEditorGeneral

For Mac OS X, Android StudioPreferencesEditorGeneral and check Show quick documentation on mouse move:

Settings dialog with checked option


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.

125
votes

Yes, you can. Go to menu FileSettingsEditorShow quick documentation on mouse move

Or, in Mac OS X, go to Android Studio → PreferencesEditorGeneralShow quick doc on mouse move.

30
votes

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):

  1. Ctrl + P: To see what parameters are expected by the function
  2. Command + J: To see the documentation
  3. Ctrl + Space: To see the autocomplete suggestions

Enter image description here

18
votes

In addition to the answers here, you might want to make sure that the documentation is downloaded. To do that, go to SDK Manager:

Enter image description here

And then the SDK Tools tab and make sure Documentation for Android SDK is installed.

Enter image description here

If it isn't, check the box and click Apply.

16
votes

Android Studio 2.x.x
Moved under menu EditorGeneral

Enter image description here

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 FileSettings or press Ctrl + Alt + S.

The following window will open and check Show quick doc on mouse move under IDE SettingsEditor.

Show quick doc

Or just press Ctrl and hover your move over your method, class, etc.

12
votes

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.

10
votes

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

7
votes

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.

7
votes

On my Mac, CtrlF1 stopped working, but F1 on its own works.

7
votes

Go to EditorPreferenceEditorGeneral and choose Show quick doc on mouse hover!

Enter image description here

2
votes

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:

Enter image description here

After this the method information will appear on a tooltip like almost every other mainstream IDE.

2
votes

MacBook: + J or Fn + F1 does the same.

Also, use the one from the editor definition as explained above.

2
votes

For Android Studio 4.1 and 4.2, this checkbox has moved under EditorGeneralCode Completion.

Enter image description here

0
votes

I'm using Visual Studio too much and I want to see parameters when I click on Ctrl + Space. That's why I'm using Visual Studio keys.

To change the keymap to the Visual Studio keymap:

Enter image description here

Enter image description here