[Android SDK] Useful keyboard shortcuts for Android Studio

The ones I use most:

While developing

Alt+enter over class in code (.java): Quick assistance (import class, override methods, etc)
Alt+enter over string in code (.java): Extract string resource (include in res/values/strings.xml)
Alt+enter over string in resource file (.xml): Extract string resource (same as previous)

Shift+Cmd+F9: Make module (only current module)
Shift+Cmd+UP: Move this line UP (in .java)
Shift+Cmd+DOWN: Move this line DOWN (in .java)

Ctrl+R (aka ^ R): Run
Ctrl+Alt+D: Debug
Ctrl+Alt+I: Auto-indent code

Cmd+Backspace: Remove current line (VERY USEFUL)
Cmd+D: Duplicate current line (VERY USEFUL)

Cmd+F9: Make project  (all modules, app, wear, glass..)

When debugging:

F8: Step over
Cmd+Alt+R: Continue execution (what a weird shortcut this one)

I’ll keep completing it everytime I find a really useful one. Feel free to post your own in comments!

[Android] Eclipse shortcuts i use most

It is worth to spend some time reading about the shortcuts eclipse offers you to save switches / context-changes and become much more productive when coding. One of the most useful tutorials is this one from vogella. After a few years coding, the ones i consider most useful are these: (yellow ones are the best time savers for me)

ctrl+3: quick access to resources
ctrl+2: quick assist – rename/assign tools (renaming vars, assigning operations to local vars)
ctrl+1: quick fix (see my strings resources tutorial)
ctrl+I: automatic code indentation
ctrl+shift+O: fix imports
alt+left: go to previous location
alt+right: go to next location
ctrl+right: move to next text element
ctrl+left: move to previous text element
ctrl+alt+down: clone selected line below (next line)
ctrl+alt+up: clone current line above (previous line)
alt+up: move current line up
alt+down: move current line down
ctrl+D: delete current line
ctrl+DEL: delete next element
ctrl+backspace: delete previous element
shift+enter: adds a new line below current, without deleting or overwriting selection
ctrl+Q: back to the last edited position

And of course, the most traditional and obvious ones:

ctrl+F: find
ctrl+X: cut
ctrl+C: copy
ctrl+V: paste
ctrl+Z: undo
ctrl+Y: redo

I suggest you to correct some bad customs and get used to these shortcuts, and you can focus more on coding and less in interruptions/switches/context changes that often act as obstacles.

Have a nice coding day! 🙂