10 shortcuts to boost your Android development
Bonus: cheat sheet included
Disclaimer: This article is relevant if you are using Android Studio IDE with the default keymap.
Introduction
I remember the day I met a senior software developer for the first time. It was my colleague and we worked together for more than 5 years. I learn a lot from him by watching him code or review my code. The first tip he gave me was the use of shortcut.
Use shortcuts and you will optimize your way of coding
For me it was strange to use shortcut, but after a while I became a little bit addicted. Today I will present you the 10 shortcuts I use to boost my Android development and I hope it will boost yours too.
The Fantastic 4
These are the four shortcuts I use the most.
1. Go to declaration
Windows = Control + Click
Mac OS =⌘+ Click
2. Search everything
Windows = Mac OS = Shift twice
3. Quick fix
Windows = Alt + Enter
Mac OS = Option + Enter
4. Generate code
Windows = Alt + Insert
Mac OS = ⌘+ N
Editing your code
My top 4 shortcuts to edit my code.
5. Surround with
Windows = Control + Alt + T
Mac OS = ⌘+Option + T
6. Override methods
Windows = Control + O
Mac OS = ⌘+ O
7. Quick documentation lookup
Windows = Control + Q
Mac OS = Control + J
8. Auto-indent lines
Windows = Control + Alt + I
Mac OS = Control + Option + I
Refactoring your code
My top 2 shortcuts to edit my code.
9. Extract method
Windows = Control + Alt + M
Mac OS = ⌘+ Option + M
10. Rename
Windows = Mac OS = Shift + F6
Conclusion
If you’re not using shortcut, I will ask you to give a try. You will thanks yourself later for this decision. If you already use shortcuts, tell me what are the shortcuts you use the most by leaving a comment below.
I hope you found this article useful. I’d appreciate it if you give me some claps.
Don’t forget to download and print the sheet.
For more shortcuts:
B E F O R E ← Documenting My Android Adventure
N E X T → Android M V P: Survival Guide