0

Recently I set my line length limit to 100 or 120 and I also enabled an option that will wrap the code that exceeded those limits to the next line, whenever I clicked Code Format.

Now I want to disable that wrap and do it manually, but I don't know where that setting was.

0

2 Answers 2

2

In Android studio go to

Preferences > Editor > Code Style > Java > Wrapping and Braces > Keep when reformatting and uncheck the checkbox Line Breaks

Sign up to request clarification or add additional context in comments.

4 Comments

i misunderstood your question. have updated my answer. please check if it is working ? @J. K.
This setting is not turned on and it still wraps when I use Code Format
Please check this and this.
The correct answer was "keep Line Breaks" checked so that I can manually wrap if I want to, and uncheck "Ensure right margin is not exceeded". I saw this in one of the links you provided
0

Go to File->Settings->Editor->Code Style

There you'll find the two options "Right margin (columns)" and "Wrap when typing reaches right margin".

1 Comment

This setting is not turned on and it still wraps when I use Code Format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.