Android studio代码格式规范

Studio使用eclipse formater的方法:

下载EclipseFormatter.zip 插件,在Android Studio中本地安装 android-formatting.xml。

Step 1: Go to the Plugins Section of Android Studio. The easiest way is Click Shift twice and typePlugins. Now go to the plugins menu.

Android studio代码格式规范_第1张图片

Step 2: Click on Browse Repositories

Android studio代码格式规范_第2张图片

Step 3: Type Eclipse Code Formatter in the search box. Select it and Click Install button in the right section

Android studio代码格式规范_第3张图片

Step 4: After successful installation you can see a blue Eclipse Icon in the top pen


Android studio代码格式规范_第4张图片

Step 5: Now go to Settings >> Other Settings >> Eclipse Code formatter

Android studio代码格式规范_第5张图片

Step 6: Then select the Code Format XML file


Android studio代码格式规范_第6张图片

/****butterknife 变量前缀m配置*****/

Android Studio > settings > butterknife>prefix

你可能感兴趣的:(Android studio代码格式规范)