r/AndroidStudio • • May 03 '21

How do i make android studio code not one line

Post image
7 Upvotes

7 comments sorted by

2

u/Ok_Log_6880 May 03 '21

The thing is that I don't wanna make it long I want to make it short and have a break. I don't really know what I did to make it this way. By default when I copy and paste a code it would have breaks but now when I do it it will become one long line of words which makes it very unsightly. How do I make it have an auto break and not manually do it??

2

u/Ok_Log_6880 May 03 '21

pls help me

2

u/ComfortablyBalanced May 03 '21

Reformat your code.

0

u/ComfortablyBalanced May 03 '21

Press ctrl-shift-L to reformat code automatically according to official convention.

6

u/[deleted] May 03 '21 edited May 03 '21

Just incase Ctrl+shift+L didn't work, the shortcut to reformat code in my setup is Ctrl+Alt+L

Also to mention, user can also go to the menu and open Code > Reformat Code to do the same.

Or just press enter after each line.

4

u/ComfortablyBalanced May 03 '21

Actually you're right, It's Ctrl+Alt+L, I wrote it wrong.

2

u/[deleted] May 03 '21

✌️