简体   繁体   English

Android Studio 代码样式设置不起作用

[英]Android Studio code style settings not work

When I select all my code in Android Studio, then I apply code formatting for example for the piece of code below:当我 select 我在 Android Studio 中的所有代码时,我将代码格式应用于以下代码:

public ArrayList<RuleData> listOfActivePromotions()
{
    try
    {
        return RuleData.getRuleData();

    }
    catch (RepositoryException ex)
    {
        ExceptionLogging.getInstance().logException(TAG, ex); Log.e(this.TAG, "error", ex); return new ArrayList<>();
    }
}

My code ends up being indented and overlapping other code that it becomes difficult to read.我的代码最终被缩进并与其他难以阅读的代码重叠。 I have set my code settings as follows:我的代码设置如下:

代码样式设置

I am not sure why it is wrapping the separate code lines like that, this only started recently.我不确定它为什么要像这样包装单独的代码行,这只是最近才开始的。 I have tried changing all the setting and still the issue persists我已尝试更改所有设置,但问题仍然存在

Delete your idea file and re-import project it will help to solve your issue删除您的想法文件并重新导入项目将有助于解决您的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM