Accepted answer

there are pre-made formatter rules available from the platform/development.git repository (github mirror, in folder /ide/eclipse).

so you can simply import android-formatting.xml and android.importorder as mentioned here.


i think personal or team preferences vary to much to globally enforce a coding style. so every body should deploy his project specific coding style.


the link in kroimon's answer to android formatter rules is broken. here is the correct one.


sync the source code according to these instructions. the formatting guidelines are in the file development/ide/eclipse/android-formatting.xml. you can import it with eclipse.

menu bar -> window -> preferences -> java -> code style -> formatter -> import

point it to the path of the android-formatting.xml


on a related note, here's how developers around google keep their various eclipse instances all in agreement: workspace mechanic for eclipse

Related Query

More Query from same tag