Skip to content

Instantly share code, notes, and snippets.

@lopspower
Last active April 22, 2024 07:02
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save lopspower/a67fa7b9b71494f6590f7412462b63ef to your computer and use it in GitHub Desktop.
Save lopspower/a67fa7b9b71494f6590f7412462b63ef to your computer and use it in GitHub Desktop.
Android studio format code auto break line

Android studio format code auto break line

Twitter

To do this in Android Studio go to Preferences > Editor > Code Style

and set Right margin (columns) to 150 (or the line width you want)

Now go to File -> Settings > Editor > Code Style > Java > Wrapping and Braces

and check the checkbox Ensure right margin in not exceeded

Apply the changes and press OK

Now in the editor you press Code > Reformat Code... to format your code to that line width.


📚 Best Android Gists

You can see other best Android Gists or offer your just here https://github.com/lopspower/BestAndroidGists 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment