I'm trying to find a way to align all the variable names and classes names in android studio, is there a way to do this automatically?
For example I want android studio to do this automatically:
private void someFunction()
{
int someVariable;
TextView anotherVariable;
}
For now I'm doing it manually by it would be easier if it could do it automatically. thanks
In Android Studio 1.3 you can enable this here:
Project Settings | Code Style | Java | Wrapping and Braces | Group declarations | Align fields in columns

To reformat your code manually, press Ctrl + Alt + L (or using the menu Code | Reformat code...).
More information about reformating source code can be found on the IntelliJ Web Help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With