This specification reference from the Android source code, and to improve, for personal use only, if you think there is merit, you can refer to the next, there are good rules, and then add
General Specification:
The class name should be clear, can reflect the role of this class, it is best to achieve the effect of the name and understanding
method name to use the verb phrase eg:public boolean movetasktoback (Boolean nonroot);
The constructor uses the Pascal naming convention, also called the Big hump rule, the first letter capitalized
Common methods and member variables are small hump rules (Camel rules), first letter lowercase
The local variables of the common method are underlined, starting with _
1. member variables of a class
All exposed class constants : Defined as static final type, name all uppercase eg:public static final String Action_main = " Android.intent.action.MAIN ";
static variable : Name begins with s eg:private static long sinstancecount = 0;
non-static private variable, protected variable : Start with m eg:private Intent mintent;protected viewparent mparent;
2. Naming the method
method Parameters : The name begins with p , which indicates the meaning of the Param eg:public int getcount (int pcount);
The local variables within the method begin with _ ,
eg public int getcount (int pcount) {
int _count;
}
This article transferred from: http://www.cnblogs.com/xiaoQLu/archive/2012/11/27/2790539.html