Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android code folding the Switch block

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.

like image 332
samjesse Avatar asked Feb 16 '15 01:02

samjesse


2 Answers

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....)

like image 50
Stuart Siegler Avatar answered Nov 12 '22 08:11

Stuart Siegler


To fold an arbitrary selected block

  1. Select contiguous fragment of code in the editor.
  2. 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

like image 40
Vitaly Zinchenko Avatar answered Nov 12 '22 08:11

Vitaly Zinchenko