How to view method information in Android Studio

Android StudioAndroid View

Android Studio Problem Overview


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?

Android Studio Solutions


Solution 1 - Android Studio

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.

Solution 2 - Android Studio

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.

Solution 3 - Android Studio

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

Solution 4 - Android Studio

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.

Solution 5 - Android Studio

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.

Solution 6 - Android Studio

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.

Solution 7 - Android Studio

>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

Solution 8 - Android Studio

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

Enter image description here

Solution 9 - Android Studio

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.

Solution 10 - Android Studio

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

Solution 11 - Android Studio

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

Enter image description here

Solution 12 - Android Studio

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.

Solution 13 - Android Studio

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

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

Solution 14 - Android Studio

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiontyczjView Question on Stackoverflow
Solution 1 - Android StudioAhmadView Answer on Stackoverflow
Solution 2 - Android StudioHải PhongView Answer on Stackoverflow
Solution 3 - Android StudioVarun VermaView Answer on Stackoverflow
Solution 4 - Android Studiostrikerdude10View Answer on Stackoverflow
Solution 5 - Android StudioLazy NinjaView Answer on Stackoverflow
Solution 6 - Android StudioRichaView Answer on Stackoverflow
Solution 7 - Android StudioMd Imran ChoudhuryView Answer on Stackoverflow
Solution 8 - Android StudioMukul AggarwalView Answer on Stackoverflow
Solution 9 - Android StudioVladView Answer on Stackoverflow
Solution 10 - Android StudiosirFunkenstineView Answer on Stackoverflow
Solution 11 - Android StudioVisual SharpView Answer on Stackoverflow
Solution 12 - Android StudioAspiring DevView Answer on Stackoverflow
Solution 13 - Android StudiosiviView Answer on Stackoverflow
Solution 14 - Android Studiouzay95View Answer on Stackoverflow