Android Studio 折叠定义和方法 [英] Android Studio Collapse definitions and methods
问题描述
如何折叠 Android Studio 编辑器中的所有定义和方法?
How can I collapse all definitions and methods within the Android Studio editor?
Visual Studio 在 Edit-->Outlining
上有这个选项,但我在 Android Studio 中找不到类似的功能.我确定此功能存在.
Visual Studio has that option on Edit-->Outlining
, but I cannot find a similar feature in Android Studio. I am sure that this feature exists.
如何访问 Android Studio 的大纲功能?
How can I access Android Studio's outlining feature?
推荐答案
在Android Studio中叫做Folding
.
It is called Folding
in Android Studio.
首先确保它在配置中启用(默认情况下应该是).转到File
-> Settings
,然后在IDE Settings
区域下找到<code>Editor ->一般 ->代码折叠,勾选显示代码折叠大纲
.
First make sure it is enabled in config (it should be by default). Go to File
-> Settings
, then under the IDE Settings
area find Editor -> General -> Code Folding
, check the Show code folding outline
.
要折叠/展开项目,请使用 Code
-> Folding
菜单.
To collapse/expand items use the Code
-> Folding
menu.
要为这些打开的设置(File
-> Settings
)自定义键盘快捷键,然后选择 IDE Settings
下的 Keymap
.现在在搜索框中输入 folding
(右上角).为各种折叠操作设置键盘快捷键:)
To customize the keyboard shortcuts for these open Settings (File
-> Settings
) then select Keymap
under IDE Settings
. Now type folding
into the search box (top right). Setup the keyboard shortcut for the various folding actions :)
这篇关于Android Studio 折叠定义和方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!