ShortCut for adding class field to existing constructor in AndroidStudio or IDEA
- Make sure, that field, you want to add to constructor is
private
- Select it's name with mouse
- Press
Alt+Enter
- Choose
add constructor parametr
Ok Then you can do this to change .
- Select the Constructor.
- Right click inside Editor.
- Click on Refactor.
- Click on Change Signature and you will see this
Once you are there you can add or remove parameters and add new signature, rename , etc..,