1. 程式人生 > 其它 >個人idea配置

個人idea配置

技術標籤:Android Studio

一、快捷鍵設定:Editor—Live Templates
1、單例(instance)

private static $Name$ mInstance;
public static $Name$ getInstance(){
    if (mInstance == null){
        mInstance = new $Name$();
    }
    return mInstance;
}

private $Name$(){ }

2、列印資料(logee)

Log.e(TAG, "$value$  = "
+ $value$);

3、列印函式(logeee)

Log.e(TAG, "$METHOD_NAME$");

4、補全TAG(taggg)

private static final String TAG = $value$.class.getSimpleName();

5、try+catch(tryyy)

try {

} catch (Exception e){
    e.printStackTrace();
}