Everyone likes to increase their productivity and everyone has their own favourite productivity hacks, but not everyone agrees! In this blog, Xavi Rigau will talk about his top three Android Studio shortcuts and how they're better than the rest.
First of all let me start saying that I like having as much space as possible for the editor in my IDE, so I don't use toolbars at all. This is how my Android Studio looks like:
All purpose shortcut
This is the best shortcut by far (at least for me) because it's basically a shortcut for shortcuts since when you trigger it, it shows a search bar that lets you perform any available action in Android Studio. Just start typing what you want to do and it'll suggest all the things that match what you type.
And this is the main reason why I don't need any toolbar.
It could be improved if you could use numbers [1-9] to select one of the suggestions, since the IDE does this for other dialogs, but for me it's not a big deal.
The 'Generate...' shortcut shows you a list of options for things that the IDE can generate for you (this is mainly code).
This is great for generating Constructors, implementing
toString methods, getters, test methods, etc.
The only downside I find to this shortcut is it doesn't really work for Android XML files, but works well for source code and even gradle scripts.
Run or Debug a configuration
This shortcut shows a list of run configurations for the current project and lets you select one of them to run it. This includes tests, Gradle tasks and any configuration you've got set up, and it even lets you use numbers to select one of the configurations!
I find the 'Run configuration' shortcut very useful because it lets you switch between running the project and running the tests very rapidly and easily.
I hope you found this list useful!