Posts

Showing posts from September, 2013

Coding convention for Android developer

Image
Hey, If you are new in Android and wondering if there is any Android Coding Standard document available, this post is for you. Check Android Code Style Guidelines for Contributors . I found the link on stackoverflow, LOL This link contains a good description of code style rules. If you are using eclipse IDE and you want to enforce this rules without remembering all of them, then you can use formatting rules provided by Android team: android-formatting.xml. Download it here You can import the file to make Eclipse follow the Android style rules. Steps are: Select Window > Preferences > Java > Code Style. Use Formatter > Import to import android-formatting.xml. Organize Imports > Import to import android.importorder. Figure 1 - Sample of code formatter preview From now on, after coding a bunch of codes, press Ctrl + Shift + F to automatically format your code. Code fun.