Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

align variables name in android studio

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

like image 628
lguenier Avatar asked Sep 30 '14 08:09

lguenier


1 Answers

In Android Studio 1.3 you can enable this here:

Project Settings | Code Style | Java | Wrapping and Braces | Group declarations | Align fields in columns

enter image description here

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

like image 91
Darek Kay Avatar answered Oct 25 '22 16:10

Darek Kay