Coding Standards helper - abdulmukit98/techshopJU GitHub Wiki

Ctrl+Alt+L

In Android Studio press ctrl + alt + L for reformat code.

Step-1

Import coding style XML file we make ready for our custom coding style.

  • Download JavaStyle.xml
  • In Android Studio goto File --> Settings --> Editor --> Code Style
  • In coding scheme action, import scheme JavaStyle.xml

cs1 cs2 cs3

  • Then select New Style then apply and ok. cs4

Step-2

  • After import, goto each java file in the project (mainActivity.java, newClass.java ...)
  • press Ctrl+Alt+L
  • The code will auto formatted in our Coding Standards