#pragma mark equivalent in Android Studio

前端 未结 1 1160
旧时难觅i
旧时难觅i 2021-01-30 15:31

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条回答
  •  忘掉有多难
    2021-01-30 16:05

    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

    0 讨论(0)
提交回复
热议问题