GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mobify-code-style/java at develop · mobify/mobify-code-style

This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Expand file tree

/

java

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

java

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
AndroidStyle.xml
AndroidStyle.xml
 
 
README.md
README.md
 
 

README.md

Outline

Almost all of our Java is written for android, so we're using the android platform development android studio config. You can also read more about the java style guide for android contributors here

You can import the provided AndroidStyle.xml file into Android Studio by:

1. Copy the AndroidStyle.xml file into ~/Library/Preferences/AndroidStudio/codestyles/
2. Restart Android Studio
3. Open Android Studio > preferences
4. Click the Code Style drop down and select Java
5. Choose the AndroidStyle option under the scheme drop down at the top.
6. Click apply, and OK

Rules

Comments

Use JavaDoc comments for classes, and every public method. For protected and private methods, use your own discression. Eg. if a protected method is going to be overridden a lot, write a JavaDoc comment!

Remove comments generated by Android Studio when class files are created. Typically it will append something like:

/**
 * Created by MikeKlemarewski 2014-12-22
 */

These are just noise. If you need to know who created the file, look at the Git history.

Member Variables

Do not prefix member variables with 'm'. Member variables should be declared at the top of the class if they are used often, otherwise they should be declared right before they are used.

Methods

Methods should be kept as shorts as possible. There is no hard limit. Methods should do one thing, and do it well. If a function starts to creep over 30 lines, this is a sign that it may have too many responsiblities and be broken up.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.