Develop Faster — Useful Shortcuts for Android Studio

Couple years ago, one of my seniors told me that “You can grasp skills of someone by paying attention to their usage of shortcuts”. While you can’t understand if someone can or can’t write some good code with this knowledge, you know over years you found yourself using more and more shortcuts for sake of speed.

So then, let’s begin shall we ? You may know couple of these, but here are some shortcuts I use and example usages.

New

Yeah. It’ll make creating new modules / packages / classes faster for you. It’s keymap name is “Other | New Folder | New”. I use “CMD + N”.

Generate

And of course, for variables:

Extract

Rename

Wrap

Unwrap

Structure

Round icons tell you what it is: a class, a method, a field, an enum, an interface… Note that this icon changes. Sides will be trimmed if member is abstract. It’ll have a diamond badge for showing member is static. If member is final, it’ll have a pin badge on it.

Red lock near round icon means it’s private, key is protected, a little grey circle is package private and green opened lock is public.

Here’s a fast usage.

If you wrap your code with regions, you can increase readability of your structure dialog !

Beware, leave a line after you write regions tho. If you don’t, it seems to add region name to randomly among members.

Navigate

Recents

You can also open up Android Studio panes from here like Project, Structure, Logcat, Build Variants, Event Log…

Find in Path

Intention Actions

Auto Complete

  • Editor Actions | Choose Lookup Item and Invoke Complete Statement
  • Editor Actions | Complete Current Statement
  • Main menu | Edit | Complete Current Statement

If you make all three the same key, it’ll work like a charm. I use “CMD + Enter”.

Well, that’ll be all for now. I hope these will help you get faster ! After I learned couple of these shortcuts, I almost don’t waste time I clicking around. Still, of course, you can still use “Main menu | Edit | Copy” and “Main menu | Edit | Paste”.

P.S. : You can use keyprompter plugin, it’ll warn you about the shortcuts you could use instead of clicking around.

Android Engineer @IKEA