1. 打开android studio

2. 选择要折叠的代码

android studio 中类似VS的代码折叠功能Region

 

3. 按Ctrl + Alt + T 选择 “region .. end region comments”

android studio 中类似VS的代码折叠功能Region

Group selection dialog

4. 代码已被 “//region” / “//endregion” 包围, 可以看到代码可以折叠了

android studio 中类似VS的代码折叠功能Region

Initial code region

5. You can now edit the description of your group

android studio 中类似VS的代码折叠功能Region

Collapsed Group with description

6. You can easily see the code within your group without having to expand the group, just hover the group description with the mouse pointer

来源:

相关文章:

  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-11-26
  • 2021-11-17
  • 2021-11-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2021-07-29
相关资源
相似解决方案