Skip to content
jhasenzahl edited this page Aug 29, 2012 · 4 revisions

To keep our code uniform throughout the project, I propose that we try to adhere to the following standards. Some of these are Java recommended and some are just my own thoughts. Please update this page with any good standards that you can think of.

###Java###

  • Classes: Begin each word with an uppercase letter. Example: AddTaskActivity
  • Methods: The first word is lowercase and the rest start with an uppercase letter. Example: parseTask
  • Variables: Words are lowercase and separated with an underscore. Example: task_name
  • Constants: Words are uppercase and separated with an underscore. Example: EXTRA_TASK

###XML###

  • IDs & Strings: Words are lowercase and separated with an underscore. The first word should describe what type of element the ID or string is for. Some common ones are TextView (text_), EditText (edit_), Button (button_), and RadioButton (radio_). Example: button_create_task

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Clone this wiki locally