Android Studio Collapse definitions and methods

前端 未结 15 1638
庸人自扰
庸人自扰 2020-12-07 10:51

How can I collapse all definitions and methods within the Android Studio editor?

Visual Studio has that option on Edit-->Outlining, but I cannot find

相关标签:
15条回答
  • 2020-12-07 11:30

    It is called Folding in Android Studio.

    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.

    To collapse/expand items use the Code -> Folding menu.

    Edit:
    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 :)

    0 讨论(0)
  • 2020-12-07 11:32

    This is valid for windows users:

    1. Select a bunch of code, then press ctrl+.. This folds your block
    2. Then to remove the folding, move to the first line where the fold starts. Don't select the code, just click in that first line, and again press ctrl+.
    0 讨论(0)
  • 2020-12-07 11:32

    (for windows)

    If you are talking about editor fold just like fcom + tab in netbeans

    ctrl + alt+ t and then add desired text in the desc block

    0 讨论(0)
提交回复
热议问题