#pragma mark equivalent in Android Studio

2020-05-14 04:28发布

Xcode have a feature called pragma mark It's very util and I'm looking for anything similar into Android Studio it can be native or a plugin.

1条回答
够拽才男人
2楼-- · 2020-05-14 04:51

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

查看更多
登录 后发表回答