1.自动导包
File -->Setting-->Editor-->General-->Auto Import ,勾选以下两项:

勾选第一项会自动导包,勾选第二项会自动删除无用的包。
2.设置代码模版注释
File -->Setting-->Editor-->File and Code Templates-->Includes-->File Header,File Header设置文件头部注释,如图:

代码模版注释设置
设置后效果如下:

3.设置LogCat颜色
File -->Setting-->Editor-->Color Scheme-->Android Logcat

Logcat信息分为好几个级别,分别是:Assert(断言)、Debug(调试)、Error(错误)、Info(信息)、Verbose(详细)、Warning(警告)。
[V]:详细(Verbose)信息,输出颜色为黑色 (我用白色)
[D]:调试(Debug)信息,输出颜色是蓝色 (我用蓝色)
[I]:通告(Info)信息,输出颜色为绿色 (我用绿色)
[W]:警告(Warn)信息,输出颜色为橙色 (我用橙色)
[E]:错误(Error)信息,输出颜色为红色,(我用淡红色)
这里错误信息的级别最高,其次是警告信息,然后是通知信息和调试信息,级别最低的是详细信息。
6.[Assert],(断言)信息,新版本加入的。(我用深红色)
4.代码提示不区分大小写
File -->Setting-->Editor-->General-->Code Completion
Case sensitive completion:选择None。

5.显示行号
File -->Setting-->Editor-->General-->Appearance
如图勾选 Show line numbers。
网友评论