0

I see "mInflator" used as a property name around the place in many examples, but I can't seem to figure out what it stands for. Specifically, the "m". "myInflator"? "mobileInflator"? Please enlighten me.

Eg:

this.mInflator = LayoutInflater.from(context)
Cloud
  • 674
  • 1
  • 3
  • 17
  • 1
    In addition to denoting **member var**, it improves readabliity of the code. It gives you a visual cue/mnemonic for what is a member var, vs. a local var – Gene Bo Dec 03 '19 at 17:53

2 Answers2

1

Just a convention to denote instance variables used in the class.

In android m is used.

Similarly in Flutter code you'll see k.

Doc
  • 7,220
  • 3
  • 16
  • 45
1

m stands for "member". it is a convention for naming member variables. They are variables defined outside of any methods but inside the class and are used in different methods. member variables often said as fields in java / android studio

Dika
  • 1,727
  • 4
  • 26
  • 42