Everyone likes to increase their productivity and everyone has their own favourite productivity hacks, but not everyone agrees! In this blog, Paul will talk about his top three Android Studio shortcuts and how they're better than the rest.
Pressing F2 will move the cursor to the next compilation error in the class file. If there are no compilation errors it will move to the next warning.
This is great when you know there's an error but you aren't sure where, or you can see there is a red error on the right side of Android Studio and to save you scrolling just hit F2.
If you want to be extra productive you can also use SHIFT + F2 to go to the previous error, really great for navigating up and down.
This shortcut will put a blank line directly below where your cursor is positioned.
The benefit being (for me at least) I no longer either have to grab the mouse or do the awkward dance of hitting END then ENTER to create a new line (without breaking the current).
There is a really complicated alternative for creating a new line above where your cursor is positioned, I don't want to tell you it because it's much easier to press up then use this key combo.
This shortcut is specifically when you are in dialog boxes (or many places with multiple options). Press the ALT key and it will put a little underline under other shortcuts that are available. Like in the GIF it shows R is available to Refactor, so if I press ALT + R it will refactor, or ALT + P to preview.
Benefit is not having to touch that dahm mouse!
A related shortcut and a bit of a hack (because I am never sure when to do it) but it is to hold CTRL when pressing Enter to confirm a dialog. Sometimes ENTER just doesn't work!
We plan, design, and develop the world’s most desirable software products. Our team’s expertise helps
brands like Sony, Motorola, Tesco, Channel4, BBC, and News Corp build fully customized Android devices
or simply make their mobile experiences the best on the market. Since 2008, our full in-house teams work
from London, Liverpool, Berlin, Barcelona, and NYC.
Let’s get in contact