-3

Could you please help me on this?

I am using UBUNTU OS and with Android studio, unable to format my code it aligned as below. Can anyone sort this issue? enter image description here

enter image description here

  • I have tried CONTROL+ALT+SHIFT+L but it doesn't worked. – Aravind Mani Aug 03 '18 at 09:32
  • Food for thoughts: by preventing people to post imgur links in questions, we would probably increase the overall site quality almost immediately... – 2Dee Aug 03 '18 at 09:35
  • check this - https://stackoverflow.com/questions/16580171/code-formatting-shortcut-in-android-studio – Sachin Rajput Aug 03 '18 at 09:36
  • 5
    There's nothing wrong with your formatting. Your lines are just wrapping around because you seem to be working on an ultra-low resolution. Hide the navigation tree on the left and you'll see everything pop into place. – Robby Cornelissen Aug 03 '18 at 09:36
  • 2
    In default key binding the format code shortcut is CTL+ALT+L. – Henry Aug 03 '18 at 09:37
  • See this doc https://developer.android.com/studio/intro/keyboard-shortcuts. `CTRL` + `ALT` + `I` of selected code. – Crammeur Aug 03 '18 at 09:38
  • The above answers not worked for me please sort this issue ASAP. – Aravind Mani Aug 03 '18 at 10:05
  • 2
    @AravindMani *"sort this issue ASAP"*? You seem to be under the mistaken assumption that we work for you or somehow owe you our efforts. Your question is a duplicate of [this one](https://stackoverflow.com/questions/20882044/android-studio-disable-line-wrap) and should be closed as such. – Robby Cornelissen Aug 03 '18 at 10:10
  • Sorry I am right. Now it worked for me. – Aravind Mani Aug 03 '18 at 10:13

1 Answers1

0

The formatting looks good, what you want is to have "soft wraps" not enabled. Search for "soft wraps" in your IDE settings, you can manage them on many different levels.

See Android Studio disable line wrap

nsndvd
  • 800
  • 8
  • 21