博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
如何在Android Studio中查看方法信息?
阅读量:2288 次
发布时间:2019-05-09

本文共 2869 字,大约阅读时间需要 9 分钟。

本文翻译自:

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. 在Eclipse中,当您将鼠标悬停在某个方法上时,会出现一个窗口,其中包含该方法的作用,参数的含义以及返回的内容。 Is there a way to get Android Studio to do the same thing? 有没有办法让Android Studio做同样的事情?


#1楼

参考:


#2楼

The easiest and the most straightforward way: 最简单,最直接的方式:

To activate: File > Settings > Editor > General 要激活: 文件>设置>编辑器>常规

For Mac OS X , Android Studio > Preferences > Editor > General and check Show quick documentation on mouse move : 对于Mac OS XAndroid Studio>首选项>编辑器>常规并选中显示鼠标移动的快速文档

Other ways: 其他方法:

  • You can go into your IntelliJ's bin folder and search for idea.properties . 您可以进入IntelliJ的bin文件夹并搜索idea.properties Add this line to the document: 将此行添加到文档中:

    auto.show.quick.doc=true

    Now you'll have the same floating docs window like in Eclipse. 现在,您将拥有与Eclipse中相同的浮动文档窗口。

  • You have to press CTRL + Q to see the Javadoc. 你必须按CTRL + Q才能看到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 documentation window for eg scrolling documentation otherwise as you move your mouse away from method documentation window will disappear. Android Studio 1.0:如果要获取文档窗口(例如滚动文档),则必须按住CTRL ,否则当您将鼠标从方法文档窗口移开时将消失。


#3楼

Yes, you can. 是的你可以。 Go to File -> Settings -> Editor -> Show quick documentation on mouse move 转到File -> Settings -> Editor -> Show quick documentation on mouse move

Or, in Mac OS X , go to Android Studio - > Preferences -> Editor - > General > Show quick documentation on mouse move . 或者,在Mac OS X中 ,转到Android Studio - > Preferences -> Editor - > General > Show quick documentation on mouse move


#4楼

Android Studio 2.xx Android Studio 2.xx

Moved under 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. 使用Windows 7和Android Studio 1.0.x我花了一些时间来弄清楚答案中提供的步骤。
To help further visitors save some time, here is the way I did it: 为了帮助更多的访问者节省一些时间,这是我的方式:
Go to File -> Settings or press CTRL + ALT + S . 转到文件 - >设置或按CTRL + ALT + S.
The following window will open and check Show quick doc on mouse move under IDE Settings -> Editor . 将打开以下窗口,并在“ IDE设置” - >“编辑器”下选中Show quick doc on mouse move

显示快速文档

Or just press CTRL and hover your move over your method, class ... 或者只需按CTRL并将您的移动悬停在您的方法上,班级......


#5楼

If you just need a shortcut, then it is Ctrl + Q on Linux (and Windows). 如果您只需要一个快捷方式,那么它在Linux(和Windows)上是Ctrl + Q. Just hover the mouse on the method and press Ctrl + Q to see the doc. 只需将鼠标悬停在方法上,然后按Ctrl + Q即可查看文档。


#6楼

Android Studio 1.2.2 has moved the setting into the General subfolder of Editor settings. Android Studio 1.2.2已将设置移至编辑器设置的General子文件夹中。


在此输入图像描述

转载地址:http://dscnb.baihongyu.com/

你可能感兴趣的文章
MySQL存储引擎
查看>>
MySQL主从同步
查看>>
MySQL半同步复制
查看>>
MySQL主库宕机从库提权
查看>>
MySQL主主模式
查看>>
MySQL错误代码
查看>>
MySQL binlog的三种模式
查看>>
MySQL利用binlog增量恢复数据库
查看>>
Tomcat多实例多应用
查看>>
Tomcat启动慢解决方法
查看>>
Tomca主配置文件详解
查看>>
Tomcat创建虚拟主机
查看>>
Tomcat集群
查看>>
Tomcat DeltaManager集群共享session
查看>>
Tomcat连接Apache之mod_proxy模块
查看>>
sersync+rsync数据同步
查看>>
使用com.aspose.words将word模板转为PDF文件时乱码解决方法
查看>>
Linux发送邮件
查看>>
YUM安装PHP5.6
查看>>
YUM源安装MySQL5.7
查看>>