I was wondering if it is possible to change the automatic formatting in Android Studio so that the brackets for anonymous classes are placed on the same line, while maintaining curly braces for ordinary classes, methods and blocks on a new line.
IntelliJ is currently giving me this result:
class TestClass
{
public void test()
{
FooBar foo = new FooBar(new Runnable()
{
@Override
public void run()
{
}
});
}
}
However, I would like the code to be formatted as follows:
class TestClass
{
public void test()
{
FooBar foo = new FooBar(new Runnable() {
@Override
public void run()
{
}
});
}
}
Everything is in order, except for one detail that I cannot get so that the bracket is formatted, as in the second example. Is it not possible or I just did not notice the settings?
source
share