Simply fork and clone this repo, and download Android Studio to start coding!
When you have made a satisfactory change (and tested it!), submit a pull request.
Following these style guidelines will increase the chance that your pull request will be accepted!
- Remove trailing whitespace
- Tab indentation
- Avoid/break lines longer than 100 characters
- Use camelCasing in Java files, including naming
- Use an empty line between methods
- Use spaces between operands
- Use a space—not a newline—before
{
- Prefix class variables with
m
- Tag overridden methods with
@Override
- Keep overridden methods at the top of the file
- Use underscores in xml and res files, including naming
- Order views in the order that they would appear on a device from top to bottom, left to right
- Order layout properties as follows:
id
,layout_width
,layout_height
, otherlayout_
properties, other properties - Write a good commit message!
- Implement
Parcelable
rather thanSerializable
- Use fragments
- Simplify the view hierarchy in layouts whenever possible
- Prefer
RelativeLayout
over nesting layouts (avoid nesting in most situations) - Use a
FrameLayout
if possible to reduce overhead - Remove unnecessary top-level layouts
- Prefer
- When calling
Log
, use a class variable as a tag, e.g.private static final String TAG
- Preferred
Log.d
call style:Log.d(TAG, "Text");
- Preferred
Log.e
call style:Log.e(TAG, "Error text", new Error());
- Preferred
- Optimize imports frequently (
Code
->Optimize Imports
) - Inspect code occasionally (
Analyze
->Inspect Code
)
Anything not mentioned here? Just take a look at the source code. Based on thoughtbot's contributing.md and style guide.