Ctrl + Alt + L
Ctrl + Shift + Alt + L
Option + Command + L
Update for Ubuntu As Rohit faced the problem in Ubuntu to format code shortcut, because the Ctrl + Alt + L key is used to lock the screen in Ubuntu.
I found that Ubuntu which handles the key event first. So try to change the Ctrl + Alt + L action in Ubuntu just to be sure.
Steps are :-
System Tools -> System Settings -> Keyboard -> Shortcuts Tab -> System -> Lock Screen
Select the row
New Accelerator... will be visible then press any Special key with Alpha key (like Shift + L). You changed the key shortcuts.
Now check format key in Studio.
Ctrl + Alt + Shift + L (for a dialog)
Update came from Henry Chuang, and also in another answer given by user2340612.
You can also use Eclipse shortcuts. Windows and Linux, go to
File > Settings > Keymap , Mac OS X, go to >
Preferences > Keymap and choose Eclipse from the dropdown menu.