1.自动导包

打开File->Settings->Editor->General->Auto Import,勾选:(如下图)

Add unambiguous imports on the fly   

Optimize imports on the fly(for current project)

即可在写代码的时候自动引入类所在的包。

AndroidStudio使用小技巧

2.类文件注释模版

打开File->Settings->Editor->File and color Templates,在右边选择 includes -> File Header

填写自己想要的注释样式,Apply即可,里面有列出了一些动态适配属性,可以自己选择。

这样在类文件开头注释时就会自动套用这个模板

AndroidStudio使用小技巧

相关文章:

  • 2021-11-05
  • 2021-07-22
  • 2021-12-07
  • 2021-08-21
  • 2021-11-26
  • 2021-06-25
  • 2021-04-13
  • 2022-01-09
猜你喜欢
  • 2021-09-30
  • 2021-06-08
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-05-08
相关资源
相似解决方案