IntelliJ style settings
IntelliJ IDEA code style settings for my Java and Android projects.
- Run the
install.shscript in bash.
- Restart IntelliJ if it's running.
- Open IntelliJ Project Settings -> Editor -> Code Style, change the code style for the project to the one you want.
This is an attempt to formalise the style I use for my code. This will be a living set of documents as I figure out what I missed.
These are mainly a summary of all the things I consider important when creating high quality Android apps. There are a lot of resources out there already, but it's not always easy to get a high level overview.
These docs aim to be that high level overview with lots of links to things like Google's coding standards for Java, the contributors style guide for the AOSP and things like Chet Haase's excellent guide to 'Developing for Android' on Medium.com (see the Useful resources section at the end of this doc).
Java style guide
Since Android is basically Java, having a separate Java style guide seemed to make sense:
Android style guide
These mainly consider performance, memory management and battery / internet usage as these are the main contributors to a great user experience.
Square's very useful Java Code Styles repo formed the basis of my style settings and installation. I changed a few minor things and added in the import statement ordering as per my style guides, but otherwise mostly re-used theirs.
These were used to form the basis of my style guides:
- Google's coding standards for source code in the Java™ Programming Language
- Android code style guidelines for contributors
- Ribot Android project and code guidelines
Some really good performance information here:
- Developing for Android by Chet Haase published on Medium.com
Lots of great videos:
Copyright 2015 Riaan Cornelius.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.