Android Studio Collapse definitions and methods

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

提交回复
热议问题