Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do many android classes (examples and source) begin with "m"?

Tags:

android

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 OnClickListener 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?

like image 700
Jason Martens Avatar asked Nov 19 '09 18:11

Jason Martens


1 Answers

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.

like image 189
Forgotten Semicolon Avatar answered Oct 06 '22 20:10

Forgotten Semicolon