Android Studio中的#pragma标记等效 [英] #pragma mark equivalent in Android Studio
本文介绍了Android Studio中的#pragma标记等效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Xcode
具有一个名为 pragma mark 的功能,它非常实用,我正在寻找对于与Android Studio
类似的任何东西,它可以是本机或插件.
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.
推荐答案
在Android Studio中,您可以使用以下步骤添加区域
In Android Studio you can add regions using the steps below
- 打开您正在使用的IDE
- 选择要分组的代码
- 按Ctrl + Alt + T(对于Mac,则为Cmd + Opt + T),然后选择区域..结束区域注释"
- 现在代码被"//region"/"//endregion"行包围,您可以看到该区域是可折叠的
- 您现在可以编辑组的描述
- 您可以轻松地在组中查看代码,而无需扩展组,只需将鼠标指针悬停在组描述上即可.
- Open the IDE you are using
- Select the code you want to group
- Press Ctrl + Alt + T (Cmd + Opt + T for mac) and select the "region .. end region comments"
- Now the code is surrounded with "//region" / "//endregion" lines, you can see that the region can be fold-able
- You can now edit the description of your group
- You can easily see the code within your group without having to expand the group, just hover the group description with the mouse pointer
请参见此
这篇关于Android Studio中的#pragma标记等效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文