Coding Standards helper - abdulmukit98/techshopJU GitHub Wiki
Ctrl+Alt+L
In Android Studio press ctrl + alt + L for reformat code.
- Android studio has its own coding style that activate when we reformat code.
- But we want our own coding style mentioned in coding standards (https://github.com/abdulmukit98/techshopJU/wiki/Coding-Standards)
- To do so we need to customize our own coding style.
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
- Then select New Style then apply and ok.
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