In Android studio, go to File -> Settings -> Editor -> General -> Code Folding. Check "Show code folding outline":