個人封裝的工具類

【持續完善中】 提供開發過程中常見的工具類,如清理緩存等

點擊查看>> 碼雲地址

使用方法:

吐司工具類

ToastUtils.showToast(this,"彈出吐司成功");

緩存清理工具類

DataClean.cleanApplicationData(this,"文件的路徑");

獲取版本號的工具類

VersionUtils.getAppVersionCode(context);

網絡狀態判斷的工具類

NetWorkUtils

SD卡操作的工具類,可以獲取SD卡的容量等等

SDCardUtils

設置跳轉的工具類

SettingUtils

如果你想在項目中使用的話,可以按照以下步驟來使用

Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of

repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
        //參考最新的版本號爲準
        compile 'com.github.clbDream:MyTools:1.6'
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章