Fennec/NativeUI/CodingStyle: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Created page with "= Coding Style = == XML files (layout, resources, styles, etc) == * Each child tag should be indented with 4 spaces. * The properties should be aligned with the first property ...")
 
No edit summary
Line 11: Line 11:


* We use the [http://www.oracle.com/technetwork/java/codeconvtoc-136057.html Java Coding Style].
* We use the [http://www.oracle.com/technetwork/java/codeconvtoc-136057.html Java Coding Style].
* The [http://source.android.com/source/code-style.html Android Coding Style] has some useful guidelines too.
* Don't use wilcard imports.
* Don't use wilcard imports.

Revision as of 18:58, 18 October 2011

Coding Style

XML files (layout, resources, styles, etc)

  • Each child tag should be indented with 4 spaces.
  • The properties should be aligned with the first property of a tag.
  • Each element should have "android:id" first, "style" (if exists) second, and the other properties follow. The root will have "xmlns:android" as first property.
  • A Line break after every tag.

Java