How to indent code in Android Studio?

Asked

Viewed 13,289 times

6

How do I indent my XML and JAVA code in Android Studio?
I would also like to know how to increase the source of the code.

  • You tried to go in this menu sequence? Settings>Editor>Colors&Fonts>Font Chose the desired font/size and had the new configuration saved?

  • yes, but it’s blocked!

2 answers

9

To ident the code has the shortcut: CTRL + ALT + L, (or if you prefer select the code you want to identar before).

To increase the source:

File Settings Editor Colors&fonts Font. Go to Save As... put a name and ok, there will unlock the options, including the Size where you can increase the source. (only unlocks if you save a new font before).

  • People, in Ubuntu Crtl + Alt + L is the command to block the user section. For those who go through this, you have a choice here: http://stackoverflow.com/questions/16580171/code-formatting-shortcut-in-android-studio

  • this, windows does not have this shortcut.

1

Windows: Ctrl + Alt + L

Linux: Ctrl + Shift + Alt + L

macOS: Option + Command + L

Browser other questions tagged

You are not signed in. Login or sign up in order to post.