系統字體
- 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