Android programming m in front of objects

I am new to Android programming and I have seen that there is an “m” in front of the objects, for example:

mCursor

mAdpter

Mview


So what is that "m"? Should I use it in my code?

Sorry for this bad question ...

+4
source share
1 answer

Follow field naming conventions

  • Non-public names of non-static fields begin with m.
  • Static field names begin with s.
  • Other fields begin with a lowercase letter.
  • Open static end fields (constants) - ALL_CAPS_WITH_UNDERSCORES.

You can see the document on these rules here .

+6
source

All Articles