Variable Name Standard in Android
This is the standard regime to follow in your coding when you define any variable.
1.Non public, non static field should starts wih m.
2.Static fields name should starts with s.
3. Other fields should starts with a lower case letter.
4.Constants field(public static final) are ALL_CAPS_WITH_UNDERSCORES
For Examples:
public class VariableStandardExample {
public int publicExample;
private static VariableStandardExample sVariableStandard;
int mStatus;
private int mPrivateExample;
protected int mProtectedExample;
public static final int MY_CONST = 53;
}
0 Comment(s)