Under Android Studio 1.0.2 is there a way to fold the block of code for a Switch conditional statement? I could not find how to do it online or in File > Settings.
Asked
Active
Viewed 2,731 times
2 Answers
10
Select the code block and right click to choose fold code block (it "says" Ctrl-Shift-Period but Ctrl-Shift-Period doesnt really do it....)

Stuart Siegler
- 1,686
- 4
- 30
- 38
-
That does not fold the Switch block, it acts on the whole code. The Switch block does not have the - or + mini_icons to the left of its lines. – samjesse Feb 16 '15 at 02:12
-
Whoops. Typo on my part Its Ctrl-Shift-Period is supposed to do it – Stuart Siegler Feb 17 '15 at 22:44
-
2on mac it's cmd-shift-period – HopefullyHelpful Aug 23 '16 at 13:07
5
To fold an arbitrary selected block
- Select contiguous fragment of code in the editor.
- On the main menu, choose Code|Folding|Fold Selection/Remove Region, or press Ctrl+Period
Source: https://www.jetbrains.com/help/idea/2017.1/code-folding.html

mike47
- 2,217
- 1
- 27
- 50

Vitaly Zinchenko
- 4,871
- 5
- 36
- 52