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.
You can see other best Android Gists or offer your just here https://github.com/lopspower/BestAndroidGists 👍.