Android Studio Collapse definitions and methods

Solution 1:

It is called Folding in Android Studio.

First make sure it is enabled in config (it should be by default). Go to File -> Settings, then under the IDE Settings area find Editor -> General -> Code Folding, check the Show code folding outline.

To collapse/expand items use the Code -> Folding menu.

Edit:
To customize the keyboard shortcuts for these open Settings (File -> Settings) then select Keymap under IDE Settings. Now type folding into the search box (top right). Setup the keyboard shortcut for the various folding actions :)

Solution 2:

For Windows:

  Minimize: CTRL + SHFT + '-'
  Expand:   CTRL + SHFT + '+'

For Mac:

  Minimize: COMM + SHFT + '-'
  Expand:   COMM + SHFT + '+'

Solution 3:

Here's screenshot for quick reference:

enter image description here

Solution 4:

View -> Tool Windows -> Structure

It's the equivalent to outline in eclipse. It gives you a far better overview of the class than folding.