问题描述
在 Eclipse 中,当您将鼠标悬停在某个方法上时,会出现一个窗口,其中描述了该方法的作用、参数的含义以及返回的内容.有没有办法让 Android Studio 做同样的事情?
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?
推荐答案
最简单直接的方法:
激活:菜单文件→设置→编辑器→常规
对于 Mac OS X,Android Studio → Preferences → Editor → General 并勾选 Show关于鼠标移动的快速文档:
For Mac OS X, Android Studio → Preferences → Editor → General and check Show quick documentation on mouse move:
其他方式:
您可以进入您的 IntelliJ IDEA bin 文件夹并搜索 idea.properties.将此行添加到文档中:
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
现在您将拥有与 Eclipse 中相同的浮动文档窗口.
Now you'll have the same floating documentation window like in Eclipse.
- 您必须按 + 才能查看 Javadoc.
- You have to press + 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:如果您想获得文档窗口,例如滚动文档,您必须按住 .否则,当您将鼠标移离方法时,文档窗口将消失.
Android Studio 1.0: You have to hold 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.
这篇关于如何在Android Studio中查看方法信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!