Android Studio Collapse definitions and methods

前端 未结 15 1637
庸人自扰
庸人自扰 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:05

    my macbookpro

    shift + cmd + ¡ (character or button before delete) Expand All

    shift + cmd + ' (character or button after zero) Collapse All

    windows

    ctrl + shift + + Expand All

    ctrl + shift + - Collapse All

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

    Here are some helpful shortcuts for folding stuff.

    1. Select Some Code And Press Ctrl + Alt + T to auto Insert Region folding around the code
    2. To Collapse Specific lines of Code, Select the code and Press Ctrl + .(dot/full stop) & Same for the reverse i.e. expand again
    3. To collapse All method bodies/ if conditions etc etc Press Ctrl + Shift + -(hyphen)
    4. To Expand All Press Ctrl + Shift + +(plus)
    0 讨论(0)
  • 2020-12-07 11:14

    For Windows:

      Minimize: CTRL + SHFT + '-'
      Expand:   CTRL + SHFT + '+'
    

    For Mac:

      Minimize: COMM + SHFT + '-'
      Expand:   COMM + SHFT + '+'
    
    0 讨论(0)
  • 2020-12-07 11:14

    If you want turn off all collapsing you need uncheck all fields in the Settings > Editor > General > Code Folding

    Also you can use hot keys

    ctrl + shift + + — expand code blocks

    ctrl + shift + - — collapse code blocks

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

    I had this issue too. I figured out to click gear button where right top of project menu section. Then I unselected Show members option.

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

    Windows 10

    ctrl + shift + + to Expand All

    ctrl + shift + - to Collapse All

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