9

In Eclipse we can correct indentation by pressing Ctrl + Shift + F.

How can I correct indentation (format code) in Android Studio?

Snostorp
  • 544
  • 1
  • 8
  • 14
alanTuring
  • 93
  • 1
  • 3

3 Answers3

15

Select the code and press

  • On Windows: Ctrl + Alt + L
  • On MAC: CMD + Option + L
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
Deadlock
  • 4,211
  • 1
  • 20
  • 25
3
File->settings->Keymap and select 'eclipse' from keymap dropdown.

By doing this all the shortcuts of eclipse will work in studio also

Ravi
  • 34,851
  • 21
  • 122
  • 183
3

File->settings->Keymap and select 'eclipse' from keymap dropdown.

Mohit Suthar
  • 8,725
  • 10
  • 37
  • 67