Is it possible to collapse all functions at the same time in Android Studio?

When working with a class with thousands of lines, minimizing some functions in the IDE is very convenient for managing code.

enter image description here

However, every time we restart the IDE; or close the function: it will be opened again.

Is there a way to keep your β€œminimizing” settings?

+7
source share
5 answers

You can go to Code> Add> Collapse All

In my case, a short segment CTRL + SHFT + / .

+10
source

Here is the current way to expand / collapse on Windows ...

enter image description here

+8
source

(for Windows users)

Collapse all methods: CTRL + SHFT + -

At the same time, all methods are expanded: CTRL + SHFT + +

(for Mac users)

Collapse all methods: Command + SHFT + -

At the same time, all methods are expanded: Command + SHFT + +

+7
source

You can go to Settings-> Editor-> General-> Code Codes-> see the checkbox, and then check the summary outline of the displayed code, then apply. (Window OS)

+2
source

On Mac OS, use the following shortcuts:

Shift + Command + -

+1
source

Source: https://habr.com/ru/post/989893/


All Articles