Search code examples
android-studiocode-folding

Folding Comments that are inside Methods


I have comments inside methods as onCreate method for example and I need to collapse them to see the code more simpler and better

Any ideas about how to do that, all my searching results led me to just do this out of methods not in

Out and In are reversed in photo

enter image description here


Solution

  • You may use Ctrl+. which allows to fold any custom region. The only drawback I see is that it requires a lot of manual work.

    More information about code folding options you may find in the IntelliJ Idea's User guide.