I am writing android now, and this "mListener" name appears in Google's API guide of fragment.
Why not just use listener? What is the significance of the m?
Asked
Active
Viewed 674 times
-1

Faust
- 9
- 3
-
Check this: http://stackoverflow.com/questions/2092098/why-do-most-variables-in-android-tutorial-start-with-m – Luis Miguel Sierra Feb 11 '16 at 11:34
-
I'm voting to close this question as off-topic because it is not a technical problem but a problem with understanding the basics of programming in general. – Viral Patel Feb 11 '16 at 11:44
-
Well, I believe style is certainly important to your technical engineering effort. – Faust Feb 11 '16 at 14:00
1 Answers
1
The mListener
is the name of the variable declared in a class. It is named with Hungarian notation naming convention.
The people who wrote AOSP followed this standard and it eventually caught up with third party app developers. It is entirely up to you to decide whether you want to follow this convention.

Much Overflow
- 3,142
- 1
- 23
- 40