How to add Eclipse Code Formatter file in Android Studio -
what have:
i have customised code format (.xml) file team wants use in our project. file includes predefined coding styles , conventions java file.
what want do:
now have add formatter default code format, when click shortcut of auto code format, entire file formatted according the conventions defined in formatter.
after long 2days effort managed steps integrate eclipse code formatter in android studio
here sharing step step procedures integrate eclipse code formatter in android studio:
step 1: go plugins section of android studio. easiest way click shift twice , type plugins. go plugins menu.

step 2: click on browse repositories

step 3: type eclipse code formatter in search box. select , click install button in right section

step 4: after successful installation can see blue eclipse icon in top pen

step 5: go settings >> other settings >> eclipse code formatter
click browse button.

step 6: select code format xml file

thats it
any time click code formatting command full code formatted according code formatter.
code formatting shortcut:
windows: ctrl + alt + l
linux: ctrl + start + alt + l
mac: option + command + l
in case want see how code formatter xml looks, can check this one.
one of used code style used google here.
Comments
Post a Comment