redgram-for-reddit icon indicating copy to clipboard operation
redgram-for-reddit copied to clipboard

Wikis - Android Studio codestyle.xml to help keep coding style consistent

Open fbis251 opened this issue 8 years ago • 2 comments

Hey,

What do you guys think of including a codestyle.xml file for this project? This will help keep the code style more consistent between contributors.

We could use some that are hosted by some bigger companies, for example here is the Google codestyle file: https://github.com/android/platform_development/blob/master/ide/intellij/codestyles/AndroidStyle.xml

Here is Square's: https://github.com/square/java-code-styles

Here are some instructions on how to import a codestyle into your configuration: https://androidbycode.wordpress.com/2015/02/14/applying-the-aosp-coding-style-in-android-studio/

Here is how to apply the imported codestyle to the current project: https://www.jetbrains.com/help/idea/2016.1/copying-code-style-settings.html

fbis251 avatar May 26 '16 19:05 fbis251

I personally like it! I have never done something like this before and I am sure it will be of great use. Is there a guide to explain each value in the XML? We can create a Wiki page for this.

mhdatie avatar May 26 '16 23:05 mhdatie

Unfortunately I don't think there's a guide that explains the XML values but if you import the codestyle.xml files you can switch between them to see what each will change via the UI: screenshot from 2016-05-26 20-29-26

fbis251 avatar May 27 '16 03:05 fbis251