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?
Here's where Android Studio comes to the rescue. Just press CTRL+Space on Windows or Command+Space on Mac and you will be presented with a popup of all the variants of a method and the arguments that it expects.
To call a method in Java, you type the method's name, followed by brackets. This code simply prints “Hello world!” to the screen. Therefore, any time we write helloMethod(); in our code, it will show that message to the screen.
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 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With