工欲善其事必先利其器娱据,Android studio是我們手機(jī)的工具蚪黑,對(duì)工具的了解程度越深,就能越方便我們的開發(fā)中剩,提高開發(fā)效率忌穿。每次新到一個(gè)公司,或者換一臺(tái)電腦结啼,重裝一次系統(tǒng)掠剑,都要重新來(lái)配置Android studio的這些配置,有時(shí)候真的想不起來(lái)還差什么郊愧,所以就干脆記錄下來(lái)朴译,往后直接對(duì)照著配置井佑。
1.設(shè)置編輯界面和代碼主題
我們可以根據(jù)我們喜好選擇我們想要的顏色,白色和黑色眠寿。
選擇"Preferences->Appearance->Theme"躬翁,默認(rèn)可以選擇Light和Darcula,分別為白色和黑色主題盯拱,選擇之后點(diǎn)擊Apply應(yīng)用盒发。
怎么沒有你喜歡的顏色?那就選擇更多的主題狡逢。去Color Themes官網(wǎng)下載各種主題的jar包宁舰。
選擇一款自己喜歡的,點(diǎn)擊綠色框下載甚侣,下載的為.jar文件
怎么使用呢?"File->import Settings"導(dǎo)入該jar文件明吩,選擇ok就ok啦,然后重啟AS殷费。
然后代碼里就是逼格慢慢的代碼主題啦印荔。
-
修改背景圖片
想要修改編碼背景圖片,在"Preferences->Appearance->Background Image"中選擇要設(shè)置的圖片详羡,點(diǎn)擊ok仍律,如下圖所示,讓你敲代碼的時(shí)候輕松愉快实柠。
2.修改字體大小和字體樣式
這個(gè)就是老生常談了水泉,在"Preferences->Editor->Color Scheme->Color Scheme Font"下,先選擇一個(gè)Scheme主題窒盐,設(shè)置size然后Apply就好了草则。在Font下可以選擇各種字體。
3.設(shè)置文件注釋模板
在"Preferences->Editor->File and Code Templates"下蟹漓,切換到Includes下炕横,在File Header里面設(shè)置注釋模板。
新創(chuàng)建的文件:
/**
* create by apple
* create on 18/11/17
* description
*/
public class CodeTemplate {
}
可選的變量名有:
redefined variables will take the following values:
${PACKAGE_NAME}
name of the package in which the new file is created
${USER}
current user system login name
${DATE}
current system date
${TIME}
current system time
${YEAR}
current year
${MONTH}
current month
${MONTH_NAME_SHORT}
first 3 letters of the current month name. Example: Jan, Feb, etc.
${MONTH_NAME_FULL}
full name of the current month. Example: January, February, etc.
${DAY}
current day of the month
${DAY_NAME_SHORT}
first 3 letters of the current day name. Example: Mon, Tue, etc.
${DAY_NAME_FULL}
full name of the current day. Example: Monday, Tuesday, etc.
${HOUR}
current hour
${MINUTE}
current minute
${PROJECT_NAME}
the name of the current project
4.設(shè)置自動(dòng)導(dǎo)包
在沒有設(shè)置自動(dòng)導(dǎo)包的時(shí)候葡粒,導(dǎo)入的包不會(huì)自動(dòng)更新份殿,設(shè)置之后廢棄的,未使用的導(dǎo)包會(huì)自動(dòng)清除掉嗽交。在"Preferences->Editor->Auto Import"中卿嘲,勾選上如下2條,就配置好自動(dòng)導(dǎo)包了夫壁。