AndroidStudio使用小技巧
1.自动导包
打开File->Settings->Editor->General->Auto Import,勾选:(如下图)
Add unambiguous imports on the fly
Optimize imports on the fly(for current project)
即可在写代码的时候自动引入类所在的包。
2.类文件注释模版
打开File->Settings->Editor->File and color Templates,在右边选择 includes -> File Header
填写自己想要的注释样式,Apply即可,里面有列出了一些动态适配属性,可以自己选择。
这样在类文件开头注释时就会自动套用这个模板