FarshidABZ
FarshidABZ

Reputation: 4123

Android Studio set variable name according to the google docs

According to the google code style docs class member variables name started with a "m" and for static field name started with a "s" at the start.

In Android Studio when we want to create a class member variable, it suggest a name like class name without "m". so we have to add "m" and change second letter to upper case.

Android studio show this

so how can I force to android studio to named variable name with a "m" at the start or "s" for static fields and for other types.

Or how can I edit code complete dialog fields.

Android studio suggest this:

ClassA classA;

Goolge docs suggest this:

ClassA mClassA;

Upvotes: 0

Views: 305

Answers (1)

vikas kumar
vikas kumar

Reputation: 11018

Just go to setting and search for code and below is the screen which will appear and allows you to change your prefix for static or member variables.

enter image description here

Upvotes: 1

Related Questions