What if i want to save that folding for future and adjust whenever i re-open that file?
Step 1:
We use custom folding
Specify custom folding with comment //region for start and //endregion for end
//region anything that you want to write (you can even leave it blank)
...
//endregion
Step 2:
Go to Settings >> Editor >> General >> Code Folding >> Untick everything >> 'Tick Custom Folding Regions' & 'Tick Show Code Folding Outline' >> Apply >> Ok
Screenshot: https://i.stack.imgur.com/sGuce.png
Step 3:
Restart Android Studio. You will see that the demarcated region has been collapsed.