Intellij (Android studio) member variable prefix

后端 未结 5 1491
情深已故
情深已故 2020-12-07 14:27

How do I configure Android Studio (or Intellij generally) to correctly generate getters and setters for member variables with prefixes?

If I have a class

         


        
5条回答
  •  无人及你
    2020-12-07 15:01

    1. Open Android Studio's preferences (from the Android Studio menu on Mac and from File -> Settings on Windows and Linux).
    2. Expand Editor and then expand Code Style.
    3. Select Java, then choose the Code Generation tab.
    4. In the Naming table, select the Field row and add m as the name prefix for fields. Then add s as the name prefix for static fields.

    1. Click Ok

提交回复
热议问题