Reputation: 19938
These are my two variables in Android Studio:
I generate the getters and setters by setting my cursor on the field called "distance" and then CMD - N
:
This is the result:
I don't understand why the field is always at the bottom and the getters and setters are at the top. I always have to manually switch them around so it looks like this:
This seems to happen in IntelliJ as well.
Is there no way to make getters and setters sit below the field instead of above it? It would definitely save me some time as I don't have to manually move the field.
Upvotes: 1
Views: 1798
Reputation: 26482
The getter and setter are generated in the position of the text cursor. Try to position the text cursor where you want the getter and setter to end up and then generate them.
Upvotes: 3