Reputation: 2001
In Android Studio 3.6.1. (Java 8) there are multiple options for folding (Code -> Folding
):
Collapse
- Collapses the code block the cursor is in, if I put it at the start of a method, it only collapses that but not the if
, for
, whatever else inside.Collapse Recursively
- Collapses the code block the cursor is in but also all the if
, for
, //
... inside.Collapse All
- Works like Collapse Recursively
but collapses all the functions in the file, so it's actually a "Collapse All Rescursively".Using the third option in a file with a lot of methods/code blocks, if I just want to work on a single method, means that I have to unfold everything inside that code block again.
I know that Eclipse and Visual Studio are able to fold all methods non-recursively (my shortcuts there are: Ctrl + Shift + Numpad / for folding and Ctrl + Shift + Numpad * for unfolding) but how do I do the same thing in Android Studio?
Upvotes: 4
Views: 367
Reputation: 31
Unfortunately it appears this can't be done. The best way to deal with this that I've found is to expand the desired method recursively with ctrl alt +
Upvotes: 3