Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#pragma mark equivalent in Android Studio

The jump bar in Xcode and #pragma mark in Objective-C are very helpful and I'm looking for anything similar in Android Studio (either native or by plug-in).

like image 508
ademar111190 Avatar asked May 12 '14 13:05

ademar111190


1 Answers

In Android Studio you can add regions using the steps below

  1. Open the IDE you are using
  2. Select the code you want to group
  3. Press Ctrl + Alt + T (Cmd + Opt + T for mac) and select the “region .. end region comments”
  4. Now the code is surrounded with “//region” / “//endregion” lines, you can see that the region can be fold-able
  5. You can now edit the description of your group
  6. You can easily see the code within your group without having to expand the group, just hover the group description with the mouse pointer

See this

like image 122
Matteo Basso Avatar answered Sep 20 '22 09:09

Matteo Basso