I have been looking over some of the android source, and the examples given in the Dev guide, and I notice that many of their classes begin with the letter m, as in the example below:
// Create an anonymous implementation of OnClickListener
private OnClickListen开发者_如何学JAVAer mCorkyListener = new OnClickListener() {
public void onClick(View v) {
// do something when the button is clicked
}
};
From this page: http://developer.android.com/guide/topics/ui/ui-events.html
What does the m signify?
The prefix 'm' is a naming convention used to denote private member variables and methods.
Various communities no longer use this convention, but apparently the person(s) who created the android documentation still follow that convention.
Well, the class doesn't begin with an "m", the variable name does. It's just a convention used to indicate that this is a member variable
精彩评论