系统字体
- File | Settings 打开设置
- 选择 Appearance
- 勾选 Override default fonts by (not recommended) ,选择一款支持中文的字体即可,size为字体大小。
文件编码
- File | Settings 打开设置
- 选择 Editor | File Encodings
建议将 IDE Encoding 、 Project Encoding 、 Properties Fiels 都设置成统一的编码。
显示行号
- File | Settings 打开设置
- 选择 Editor | General | Appearance
- 勾选 Show line numbers
驼峰选择
AS默认Ctrl + Left / Right 键改变字符选择区域的时候 Android Studio 默认不支持‘驼峰’单词的选择。
设置驼峰选择:
* File | Settings 打开设置
* 选择 Editor | General | Smart Keys
* 选中 Use “CamelHumps” words
自动导包
- File | Settings 打开设置
- 选择 Editor | General | Auto Import
- 勾选 Optimize imports on the fly
- 勾选 Add unambiguous imports on the fly
如果有多个相同包名的情况下,不会自动导入,而是自己选择。
LOG颜色
AS默认的LOG颜色并不太好区分,我们可以自己设置:
* File | Settings 打开
* 选择 Editor | Color & Fonts | Android
* 点击 Click on Save As…按钮创建一个新的配色 Scheme
* 按照下面的表格修改对应的颜色(修改之前需要取消勾选 Use inherited attributes)
Log级别 | 颜色 |
---|---|
Assert: | #AA66CC |
Debug: | #33B5E5 |
Error: | #FF4444 |
Info: | #99CC00 |
Verbose: | #FFFFFF |
Warning: | #FFBB33 |
设置前:
设置后:
警戒线设置
- File | Settings 打开设置
- 选择 Editor | General | Appearance
- 勾选 Show rigth margin(configured in Code Style options)
禁用拼写检查
- File | Settings 打开
- 选择 Editor | Inspections
- 取消勾选 Spelling