No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

IntelliJ style settings

IntelliJ IDEA code style settings for my Java and Android projects.


  • Run the script 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.

Style guide

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 (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:

Java style guide

Android style guide

Android style guide

Best practices

These mainly consider performance, memory management and battery / internet usage as these are the main contributors to a great user experience.

Android best practices

Useful resources:

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:

Some really good performance information here:

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.