Kotlin擴展函數的使用

在使用java開發Android時,我們經常會封裝許多工具類比如: public class Utils{     private String getAppVersion(Context context){     ........//      return version;     } } 想要獲取App的Vsersion必須傳入Context對象作爲參數,然而在Kotlin中我們可以直接對
相關文章
相關標籤/搜索