Skip to content

Instantly share code, notes, and snippets.

@lopspower
Last active June 18, 2024 06:05
Show Gist options
  • 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