You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on this SO post, you can drop this AndroidStyle.xml file into the Android Studio codestyles directory, which for me is in my user preferences directory C:\Users\barbeau\.AndroidStudioPreview\config\codestyles.
@paulcwatts Thoughts on officially adopting this code style, and adding guidance to README and CONTRIBUTIONS to use this style for contributions? This might result in several initial formatting commits to fully bring the project in line with the style guide.
The text was updated successfully, but these errors were encountered:
I'll submit a PR for this shortly for you to review. Actually not as many changes as I would have thought after applying the template, you're very consistent, and I guess I've blended in reasonably :).
From a quick scan of the changes, most seem very reasonable. There are some changes that decrease code density, which I'm not a big fan of, but IMO consistency is more important in the long run:
Adds blank lines between variable declarations
Cascades lines that slightly exceed allowed line width to the following lines
Expands BuildConfig.DEBUG logging statements to three lines (as opposed to one)
Cascades NO-OP methods to three lines (as opposed to one)
Single-line IF statements are surrounded by braces (this I actually like)
If any of the above are deal breakers for you we could look at modifying the AndroidStyle.xml template, although we'd need to do this every time we re-import the template (I'm including the XML file in the repo as well, so we're all working off the same style guide, without external dependencies, until we check in a new version).
As discussed here, we'd like OBA Android to follow similar code style guidelines as Android itself:
http://source.android.com/source/code-style.html
We can use the AOSP style guide template for IntelliJ from latest Android code with Android Studio:
https://android.googlesource.com/platform/development/+/master/ide/intellij/codestyles/AndroidStyle.xml
Based on this SO post, you can drop this AndroidStyle.xml file into the Android Studio
codestyles
directory, which for me is in my user preferences directoryC:\Users\barbeau\.AndroidStudioPreview\config\codestyles
.@paulcwatts Thoughts on officially adopting this code style, and adding guidance to README and CONTRIBUTIONS to use this style for contributions? This might result in several initial formatting commits to fully bring the project in line with the style guide.
The text was updated successfully, but these errors were encountered: