Redgram / redgram-for-reddit

An Open-Sourced Android Reddit Client
GNU General Public License v3.0
102 stars 19 forks source link

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

Open fbis251 opened 8 years ago

fbis251 commented 8 years ago

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

mhdatie commented 8 years ago

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.

fbis251 commented 8 years ago

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