首页 > 解决方案 > 我可以在 Android Studio 中创建自定义重新格式化代码吗

问题描述

我可以创建自定义重新格式化代码吗?

当我在主题文件中按 Ctrl + Alt + L 时,结果将是这样的

<resources>

    <style name="Theme.Test" parent="Theme.AppCompat.Light">
        <item name="colorPrimary">@color/purple_500</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/white</item>
    </style>
</resources>

我想要这样的

<resources>

    <style name="Theme.Test" parent="Theme.AppCompat.Light">
        <item name="colorPrimary">@color/purple_500</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/white</item>
    </style>

</resources>

有可能这样做吗?

标签: android-studiointellij-idea

解决方案


推荐阅读