Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop Android Studio from wrapping methods and constructors

How can I stop Android Studio from wrapping method lines and constructors?

This is how Android Studio currently does it:

A class

public class Foo {

    public Foo(Context context, AttributeSet attrs) { super(context, attrs); }
}

A Method

public static void doSomething(Foo foo) { foo.doWork(); }

This is how I would like it:

A class

public class Foo {

    public Foo(Context context, AttributeSet attrs) { 
        super(context, attrs); 
    }
}

A Method

public static void doSomething(Foo foo) { 
    foo.doWork(); 
}
like image 859
user3931426 Avatar asked Aug 11 '14 23:08

user3931426


1 Answers

Navigate to

Settings >> Editor >> General >> Code Folding

You will find One-line methods checked there. Uncheck it. There are also other settings, you can change as you need. I attached the screenshot too.

enter image description here

Finally Restart your IDE. Done!

Hope this is helpful.

like image 137
Madan Sapkota Avatar answered Oct 14 '22 21:10

Madan Sapkota