<div class="htmledit_views">
                
<p>开发人员不得不用的工具这里几乎都已经总结,在这里面很好的一个库。</p>
<p>导入库<br></p>
<pre style="font-family:'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;font-size:13.6px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);color:rgb(36,41,46);">compile <span class="pl-s" style="color:rgb(3,47,98);"><span class="pl-pds">'</span>com.blankj:utilcode:1.9.0<span class="pl-pds">'</span></span></pre>
<p></p>
<p><a href="https://github.com/Blankj/AndroidUtilCode" rel="nofollow" target="_blank">https://github.com/Blankj/AndroidUtilCode</a>点击打开官网查看跟多工具类</p>
<p><strong>API的解释</strong></p>
<p><strong></strong></p>
<h3><a name="t0"></a>Activity相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/ActivityUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">ActivityUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/ActivityActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
<br><pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">isActivityExists   : 判断是否存在Activity
startActivity      : 打开Activity
getLauncherActivity: 获取入口activity
getTopActivity     : 获取栈顶Activity</pre>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t1"></a>App相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/AppUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">AppUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/AppActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">isInstallApp         : 判断App是否安装
installApp           : 安装App(支持7.0)
installAppSilent     : 静默安装App
uninstallApp         : 卸载App
uninstallAppSilent   : 静默卸载App
isAppRoot            : 判断App是否有root权限
launchApp            : 打开App
getAppPackageName    : 获取App包名
getAppDetailsSettings: 获取App具体设置
getAppName           : 获取App名称
getAppIcon           : 获取App图标
getAppPath           : 获取App路径
getAppVersionName    : 获取App版本号
getAppVersionCode    : 获取App版本码
isSystemApp          : 判断App是否是系统应用
isAppDebug           : 判断App是否是Debug版本
getAppSignature      : 获取App签名
getAppSignatureSHA1  : 获取应用签名的的SHA1值
isAppForeground      : 判断App是否处于前台
getForegroundApp     : 获取前台应用包名
getAppInfo           : 获取App信息
getAppsInfo          : 获取所有已安装App信息
cleanAppData         : 清除App所有数据</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t2"></a>栏相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/BarUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">BarUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">setTransparentStatusBar: 设置透明状态栏(api大于19方可使用)
hideStatusBar          : 隐藏状态栏
getStatusBarHeight     : 获取状态栏高度
isStatusBarExists      : 判断状态栏是否存在
getActionBarHeight     : 获取ActionBar高度
showNotificationBar    : 显示通知栏
hideNotificationBar    : 隐藏通知栏</pre>
</div>
</div>
<br><ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t3"></a>栏相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/BarUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">BarUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">setTransparentStatusBar: 设置透明状态栏(api大于19方可使用)
hideStatusBar          : 隐藏状态栏
getStatusBarHeight     : 获取状态栏高度
isStatusBarExists      : 判断状态栏是否存在
getActionBarHeight     : 获取ActionBar高度
showNotificationBar    : 显示通知栏
hideNotificationBar    : 隐藏通知栏</pre>
</div>
</div>
<br><ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t4"></a>清除相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/CleanUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">CleanUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/CleanActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">cleanInternalCache   : 清除内部缓存
cleanInternalFiles   : 清除内部文件
cleanInternalDbs     : 清除内部数据库
cleanInternalDbByName: 根据名称清除数据库
cleanInternalSP      : 清除内部SP
cleanExternalCache   : 清除外部缓存
cleanCustomCache     : 清除自定义目录下的文件
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t5"></a><a id="剪贴板相关clipboardutilsjava" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%89%AA%E8%B4%B4%E6%9D%BF%E7%9B%B8%E5%85%B3clipboardutilsjava" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>剪贴板相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/ClipboardUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">ClipboardUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">copyText  : 复制文本到剪贴板
getText   : 获取剪贴板的文本
copyUri   : 复制uri到剪贴板
getUri    : 获取剪贴板的uri
copyIntent: 复制意图到剪贴板
getIntent : 获取剪贴板的意图
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t6"></a><a id="关闭相关closeutilsjava" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%85%B3%E9%97%AD%E7%9B%B8%E5%85%B3closeutilsjava" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>关闭相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/CloseUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">CloseUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">closeIO       : 关闭IO
closeIOQuietly: 安静关闭IO
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t7"></a><a id="转换相关convertutilsjavatest" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E8%BD%AC%E6%8D%A2%E7%9B%B8%E5%85%B3convertutilsjavatest" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>转换相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/ConvertUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">ConvertUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/ConvertUtilsTest.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Test</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">bytes2HexString, hexString2Bytes        : byteArr与hexString互转
chars2Bytes, bytes2Chars                : charArr与byteArr互转
memorySize2Byte, byte2MemorySize        : 以unit为单位的内存大小与字节数互转
byte2FitMemorySize                      : 字节数转合适内存大小
timeSpan2Millis, millis2TimeSpan        : 以unit为单位的时间长度与毫秒时间戳互转
millis2FitTimeSpan                      : 毫秒时间戳转合适时间长度
bytes2Bits, bits2Bytes                  : bytes与bits互转
input2OutputStream, output2InputStream  : inputStream与outputStream互转
inputStream2Bytes, bytes2InputStream    : inputStream与byteArr互转
outputStream2Bytes, bytes2OutputStream  : outputStream与byteArr互转
inputStream2String, string2InputStream  : inputStream与string按编码互转
outputStream2String, string2OutputStream: outputStream与string按编码互转
bitmap2Bytes, bytes2Bitmap              : bitmap与byteArr互转
drawable2Bitmap, bitmap2Drawable        : drawable与bitmap互转
drawable2Bytes, bytes2Drawable          : drawable与byteArr互转
view2Bitmap                             : view转Bitmap
dp2px, px2dp                            : dp与px互转
sp2px, px2sp                            : sp与px互转
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t8"></a><a id="崩溃相关crashutilsjava" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%B4%A9%E6%BA%83%E7%9B%B8%E5%85%B3crashutilsjava" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>崩溃相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/CrashUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">CrashUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">getInstance: 获取单例
init       : 初始化
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t9"></a><a id="设备相关deviceutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E8%AE%BE%E5%A4%87%E7%9B%B8%E5%85%B3deviceutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>设备相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/DeviceUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">DeviceUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/DeviceActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">isDeviceRooted   : 判断设备是否rooted
getSDKVersion    : 获取设备系统版本号
getAndroidID     : 获取设备AndroidID
getMacAddress    : 获取设备MAC地址
getManufacturer  : 获取设备厂商
getModel         : 获取设备型号
shutdown         : 关机
reboot           : 重启
reboot2Recovery  : 重启到recovery
reboot2Bootloader: 重启到bootloader
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t10"></a><a id="判空相关emptyutilsjavatest" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%88%A4%E7%A9%BA%E7%9B%B8%E5%85%B3emptyutilsjavatest" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>判空相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/EmptyUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">EmptyUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/EmptyUtilsTest.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Test</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">isEmpty   : 判断对象是否为空
isNotEmpty: 判断对象是否非空
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t11"></a><a id="编码解码相关encodeutilsjavatest" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E7%BC%96%E7%A0%81%E8%A7%A3%E7%A0%81%E7%9B%B8%E5%85%B3encodeutilsjavatest" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>编码解码相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/EncodeUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">EncodeUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/EncodeUtilsTest.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Test</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">urlEncode          : URL编码
urlDecode          : URL解码
base64Encode       : Base64编码
base64Encode2String: Base64编码
base64Decode       : Base64解码
base64UrlSafeEncode: Base64URL安全编码
htmlEncode         : Html编码
htmlDecode         : Html解码
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t12"></a><a id="加密解密相关encryptutilsjavatest" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%8A%A0%E5%AF%86%E8%A7%A3%E5%AF%86%E7%9B%B8%E5%85%B3encryptutilsjavatest" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>加密解密相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/EncryptUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">EncryptUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/EncryptUtilsTest.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Test</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">encryptMD2, encryptMD2ToString                        : MD2加密
encryptMD5, encryptMD5ToString                        : MD5加密
encryptMD5File, encryptMD5File2String                 : MD5加密文件
encryptSHA1, encryptSHA1ToString                      : SHA1加密
encryptSHA224, encryptSHA224ToString                  : SHA224加密
encryptSHA256, encryptSHA256ToString                  : SHA256加密
encryptSHA384, encryptSHA384ToString                  : SHA384加密
encryptSHA512, encryptSHA512ToString                  : SHA512加密
encryptHmacMD5, encryptHmacMD5ToString                : HmacMD5加密
encryptHmacSHA1, encryptHmacSHA1ToString              : HmacSHA1加密
encryptHmacSHA224, encryptHmacSHA224ToString          : HmacSHA224加密
encryptHmacSHA256, encryptHmacSHA256ToString          : HmacSHA256加密
encryptHmacSHA384, encryptHmacSHA384ToString          : HmacSHA384加密
encryptHmacSHA512, encryptHmacSHA512ToString          : HmacSHA512加密
encryptDES, encryptDES2HexString, encryptDES2Base64   : DES加密
decryptDES, decryptHexStringDES, decryptBase64DES     : DES解密
encrypt3DES, encrypt3DES2HexString, encrypt3DES2Base64: 3DES加密
decrypt3DES, decryptHexString3DES, decryptBase64_3DES : 3DES解密
encryptAES, encryptAES2HexString, encryptAES2Base64   : AES加密
decryptAES, decryptHexStringAES, decryptBase64AES     : AES解密
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t13"></a><a id="文件相关fileutilsjavatest" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E6%96%87%E4%BB%B6%E7%9B%B8%E5%85%B3fileutilsjavatest" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>文件相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/FileUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">FileUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/FileUtilsTest.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Test</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">getFileByPath            : 根据文件路径获取文件
isFileExists             : 判断文件是否存在
rename                   : 重命名文件
isDir                    : 判断是否是目录
isFile                   : 判断是否是文件
createOrExistsDir        : 判断目录是否存在,不存在则判断是否创建成功
createOrExistsFile       : 判断文件是否存在,不存在则判断是否创建成功
createFileByDeleteOldFile: 判断文件是否存在,存在则在创建之前删除
copyDir                  : 复制目录
copyFile                 : 复制文件
moveDir                  : 移动目录
moveFile                 : 移动文件
deleteDir                : 删除目录
deleteFile               : 删除文件
listFilesInDir           : 获取目录下所有文件
listFilesInDir           : 获取目录下所有文件包括子目录
listFilesInDirWithFilter : 获取目录下所有后缀名为suffix的文件
listFilesInDirWithFilter : 获取目录下所有后缀名为suffix的文件包括子目录
listFilesInDirWithFilter : 获取目录下所有符合filter的文件
listFilesInDirWithFilter : 获取目录下所有符合filter的文件包括子目录
searchFileInDir          : 获取目录下指定文件名的文件包括子目录
writeFileFromIS          : 将输入流写入文件
writeFileFromString      : 将字符串写入文件
readFile2List            : 指定编码按行读取文件到链表中
readFile2String          : 指定编码按行读取文件到字符串中
readFile2Bytes           : 读取文件到字符数组中
getFileLastModified      : 获取文件最后修改的毫秒时间戳
getFileCharsetSimple     : 简单获取文件编码格式
getFileLines             : 获取文件行数
getDirSize               : 获取目录大小
getFileSize              : 获取文件大小
getDirLength             : 获取目录长度
getFileLength            : 获取文件长度
getFileMD5               : 获取文件的MD5校验码
getFileMD5ToString       : 获取文件的MD5校验码
getDirName               : 根据全路径获取最长目录
getFileName              : 根据全路径获取文件名
getFileNameNoExtension   : 根据全路径获取文件名不带拓展名
getFileExtension         : 根据全路径获取文件拓展名
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t14"></a><a id="fragment相关fragmentutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#fragment%E7%9B%B8%E5%85%B3fragmentutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>Fragment相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/FragmentUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">FragmentUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/FragmentActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">addFragment              : 新增fragment
hideAddFragment          : 先隐藏后新增fragment
addFragments             : 新增多个fragment
removeFragment           : 移除fragment
removeToFragment         : 移除到指定fragment
removeFragments          : 移除同级别fragment
removeAllFragments       : 移除所有fragment
replaceFragment          : 替换fragment
popFragment              : 出栈fragment
popToFragment            : 出栈到指定fragment
popFragments             : 出栈同级别fragment
popAllFragments          : 出栈所有fragment
popAddFragment           : 先出栈后新增fragment
hideFragment             : 隐藏fragment
hideFragments            : 隐藏同级别fragment
showFragment             : 显示fragment
hideShowFragment         : 先隐藏后显示fragment
getLastAddFragment       : 获取同级别最后加入的fragment
getLastAddFragmentInStack: 获取栈中同级别最后加入的fragment
getTopShowFragment       : 获取顶层可见fragment
getTopShowFragmentInStack: 获取栈中顶层可见fragment
getFragments             : 获取同级别fragment
getFragmentsInStack      : 获取栈中同级别fragment
getAllFragments          : 获取所有fragment
getAllFragmentsInStack   : 获取栈中所有fragment
getPreFragment           : 获取目标fragment的前一个fragment
findFragment             : 查找fragment
dispatchBackPress        : 处理fragment回退键
setBackgroundColor       : 设置背景色
setBackgroundResource    : 设置背景资源
setBackground            : 设置背景
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t15"></a><a id="handler相关handlerutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#handler%E7%9B%B8%E5%85%B3handlerutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>Handler相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/HandlerUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">HandlerUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/HandlerActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">HandlerHolder: 使用必读
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t16"></a><a id="图片相关imageutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%9B%BE%E7%89%87%E7%9B%B8%E5%85%B3imageutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>图片相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/ImageUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">ImageUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/ImageActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">bitmap2Bytes, bytes2Bitmap      : bitmap与byteArr互转
drawable2Bitmap, bitmap2Drawable: drawable与bitmap互转
drawable2Bytes, bytes2Drawable  : drawable与byteArr互转
getBitmap                       : 获取bitmap
scale                           : 缩放图片
clip                            : 裁剪图片
skew                            : 倾斜图片
rotate                          : 旋转图片
getRotateDegree                 : 获取图片旋转角度
toRound                         : 转为圆形图片
toRoundCorner                   : 转为圆角图片
fastBlur                        : 快速模糊
renderScriptBlur                : renderScript模糊图片
stackBlur                       : stack模糊图片
addFrame                        : 添加颜色边框
addReflection                   : 添加倒影
addTextWatermark                : 添加文字水印
addImageWatermark               : 添加图片水印
toAlpha                         : 转为alpha位图
toGray                          : 转为灰度图片
save                            : 保存图片
isImage                         : 根据文件名判断文件是否为图片
getImageType                    : 获取图片类型
compressByScale                 : 按缩放压缩
compressByQuality               : 按质量压缩
compressBySampleSize            : 按采样大小压缩
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t17"></a><a id="意图相关intentutilsjava" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E6%84%8F%E5%9B%BE%E7%9B%B8%E5%85%B3intentutilsjava" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>意图相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/IntentUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">IntentUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">getInstallAppIntent        : 获取安装App(支持6.0)的意图
getUninstallAppIntent      : 获取卸载App的意图
getLaunchAppIntent         : 获取打开App的意图
getAppDetailsSettingsIntent: 获取App具体设置的意图
getShareTextIntent         : 获取分享文本的意图
getShareImageIntent        : 获取分享图片的意图
getComponentIntent         : 获取其他应用组件的意图
getShutdownIntent          : 获取关机的意图
getCaptureIntent           : 获取拍照的意图
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t18"></a><a id="键盘相关keyboardutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E9%94%AE%E7%9B%98%E7%9B%B8%E5%85%B3keyboardutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>键盘相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/KeyboardUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">KeyboardUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/KeyboardActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">hideSoftInput               : 动态隐藏软键盘
clickBlankArea2HideSoftInput: 点击屏幕空白区域隐藏软键盘
showSoftInput               : 动态显示软键盘
toggleSoftInput             : 切换键盘显示与否状态
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t19"></a><a id="定位相关locationutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%AE%9A%E4%BD%8D%E7%9B%B8%E5%85%B3locationutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>定位相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/LocationUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">LocationUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/LocationActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">isGpsEnabled     : 判断Gps是否可用
isLocationEnabled: 判断定位是否可用
openGpsSettings  : 打开Gps设置界面
register         : 注册
unregister       : 注销
getAddress       : 根据经纬度获取地理位置
getCountryName   : 根据经纬度获取所在国家
getLocality      : 根据经纬度获取所在地
getStreet        : 根据经纬度获取所在街道
isBetterLocation : 是否更好的位置
isSameProvider   : 是否相同的提供者
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t20"></a><a id="日志相关logutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E6%97%A5%E5%BF%97%E7%9B%B8%E5%85%B3logutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>日志相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/LogUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">LogUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/LogActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">Builder.setLogSwitch     : 设置log总开关
Builder.setGlobalTag     : 设置log全局tag
Builder.setLogHeadSwitch : 设置log头开关
Builder.setLog2FileSwitch: 设置log文件开关
Builder.setDir           : 设置log文件存储目录
Builder.setBorderSwitch  : 设置log边框开关
Builder.setLogFilter     : 设置log过滤器
v                        : Verbose日志
d                        : Debug日志
i                        : Info日志
w                        : Warn日志
e                        : Error日志
a                        : Assert日志
file                     : log到文件
json                     : log字符串之json
xml                      : log字符串之xml
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t21"></a><a id="网络相关networkutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E7%BD%91%E7%BB%9C%E7%9B%B8%E5%85%B3networkutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>网络相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/NetworkUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">NetworkUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/NetworkActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">openWirelessSettings  : 打开网络设置界面
isConnected           : 判断网络是否连接
isAvailableByPing     : 判断网络是否可用
getDataEnabled        : 判断移动数据是否打开
setDataEnabled        : 打开或关闭移动数据
is4G                  : 判断网络是否是4G
getWifiEnabled        : 判断wifi是否打开
setWifiEnabled        : 打开或关闭wifi
isWifiConnected       : 判断wifi是否连接状态
isWifiAvailable       : 判断wifi数据是否可用
getNetworkOperatorName: 获取移动网络运营商名称
getNetworkType        : 获取当前网络类型
getIPAddress          : 获取IP地址
getDomainAddress      : 获取域名ip地址
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t22"></a><a id="手机相关phoneutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E6%89%8B%E6%9C%BA%E7%9B%B8%E5%85%B3phoneutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>手机相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/PhoneUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">PhoneUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/PhoneActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">isPhone            : 判断设备是否是手机
getIMEI            : 获取IMEI码
getIMSI            : 获取IMSI码
getPhoneType       : 获取移动终端类型
isSimCardReady     : 判断sim卡是否准备好
getSimOperatorName : 获取Sim卡运营商名称
getSimOperatorByMnc: 获取Sim卡运营商名称
getPhoneStatus     : 获取手机状态信息
dial               : 跳至拨号界面
call               : 拨打phoneNumber
sendSms            : 跳至发送短信界面
sendSmsSilent      : 发送短信
getAllContactInfo  : 获取手机联系人
getContactNum      : 打开手机联系人界面点击联系人后便获取该号码
getAllSMS          : 获取手机短信并保存到xml中
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t23"></a><a id="拼音相关pinyinutilsjavatest" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E6%8B%BC%E9%9F%B3%E7%9B%B8%E5%85%B3pinyinutilsjavatest" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>拼音相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/PinyinUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">PinyinUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/PinyinUtilsTest.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Test</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">ccs2Pinyin           : 汉字转拼音
ccs2Pinyin           : 汉字转拼音
getPinyinFirstLetter : 获取第一个汉字首字母
getPinyinFirstLetters: 获取所有汉字的首字母
getSurnamePinyin     : 根据名字获取姓氏的拼音
getSurnameFirstLetter: 根据名字获取姓氏的首字母
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t24"></a><a id="进程相关processutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E8%BF%9B%E7%A8%8B%E7%9B%B8%E5%85%B3processutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>进程相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/ProcessUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">ProcessUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/ProcessActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">getForegroundProcessName  : 获取前台线程包名
killAllBackgroundProcesses: 杀死所有的后台服务进程
killBackgroundProcesses   : 杀死后台服务进程
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t25"></a><a id="正则相关regexutilsjavatest" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E6%AD%A3%E5%88%99%E7%9B%B8%E5%85%B3regexutilsjavatest" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>正则相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/RegexUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">RegexUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/test/java/com/blankj/utilcode/util/RegexUtilsTest.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Test</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">isMobileSimple : 验证手机号(简单)
isMobileExact  : 验证手机号(精确)
isTel          : 验证电话号码
isIDCard15     : 验证身份证号码15位
isIDCard18     : 验证身份证号码18位
isEmail        : 验证邮箱
isURL          : 验证URL
isZh           : 验证汉字
isUsername     : 验证用户名
isDate         : 验证yyyy-MM-dd格式的日期校验,已考虑平闰年
isIP           : 验证IP地址
isMatch        : 判断是否匹配正则
getMatches     : 获取正则匹配的部分
getSplits      : 获取正则匹配分组
getReplaceFirst: 替换正则匹配的第一部分
getReplaceAll  : 替换所有正则匹配的部分
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t26"></a><a id="屏幕相关screenutilsjava" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%B1%8F%E5%B9%95%E7%9B%B8%E5%85%B3screenutilsjava" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>屏幕相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/ScreenUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">ScreenUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">getScreenWidth         : 获取屏幕的宽度(单位:px)
getScreenHeight        : 获取屏幕的高度(单位:px)
setLandscape           : 设置屏幕为横屏
setPortrait            : 设置屏幕为竖屏
isLandscape            : 判断是否横屏
isPortrait             : 判断是否竖屏
getScreenRotation      : 获取屏幕旋转角度
captureWithStatusBar   : 获取当前屏幕截图,包含状态栏
captureWithoutStatusBar: 获取当前屏幕截图,不包含状态栏
isScreenLock           : 判断是否锁屏
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t27"></a><a id="sd卡相关sdcardutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#sd%E5%8D%A1%E7%9B%B8%E5%85%B3sdcardutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>SD卡相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/SDCardUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">SDCardUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/SDCardActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">isSDCardEnable: 判断SD卡是否可用
getSDCardPath : 获取SD卡路径
getDataPath   : 获取SD卡Data路径
getFreeSpace  : 计算SD卡的剩余空间
getSDCardInfo : 获取SD卡信息
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t28"></a><a id="服务相关serviceutilsjava" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E6%9C%8D%E5%8A%A1%E7%9B%B8%E5%85%B3serviceutilsjava" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>服务相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/ServiceUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">ServiceUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">getAllRunningService: 获取所有运行的服务
startService        : 启动服务
stopService         : 停止服务
bindService         : 绑定服务
unbindService       : 解绑服务
isServiceRunning    : 判断服务是否运行
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t29"></a><a id="shell相关shellutilsjava" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#shell%E7%9B%B8%E5%85%B3shellutilsjava" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>Shell相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/ShellUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">ShellUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">execCmd: 是否是在root下执行命令
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t30"></a><a id="尺寸相关sizeutilsjava" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#%E5%B0%BA%E5%AF%B8%E7%9B%B8%E5%85%B3sizeutilsjava" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>尺寸相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/SizeUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">SizeUtils.java</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">dp2px, px2dp     : dp与px转换
sp2px, px2sp     : sp与px转换
applyDimension   : 各种单位转换
forceGetViewSize : 在onCreate中获取视图的尺寸
measureView      : 测量视图尺寸
getMeasuredWidth : 获取测量视图宽度
getMeasuredHeight: 获取测量视图高度
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t31"></a><a id="snackbar相关snackbarutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#snackbar%E7%9B%B8%E5%85%B3snackbarutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>Snackbar相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/SnackbarUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">SnackbarUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/SnackbarActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">showShort     : 显示短时snackbar
showLong      : 显示长时snackbar
showIndefinite: 显示自定义时长snackbar
addView       : 为SnackBar添加布局
dismiss       : 取消snackbar显示
</pre>
</div>
</div>
<ul class="task-list" style="line-height:24px;color:rgb(64,72,91);font-size:15px;"><li>
<h3><a name="t32"></a><a id="spannablestring相关spannablestringutilsjavademo" class="anchor" href="http://git.oschina.net/panweihuang/AndroidUtilCode/#spannablestring%E7%9B%B8%E5%85%B3spannablestringutilsjavademo" rel="nofollow" style="color:rgb(9,94,171);background:transparent;display:block;margin-left:-20px;" target="_blank"></a>SpannableString相关→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/util/SpannableStringUtils.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">SpannableStringUtils.java</a>→<a href="https://github.com/Blankj/AndroidUtilCode/blob/master/app/src/main/java/com/blankj/androidutilcode/activity/SpannableActivity.java" rel="nofollow" style="color:rgb(9,94,171);background:transparent;" target="_blank">Demo</a></h3>
</li></ul><div class="white" style="color:rgb(64,72,91);font-size:15px;">
<div class="highlight">
<pre style="overflow:auto;font-family:Menlo, 'Liberation Mono', Consolas, 'DejaVu Sans Mono', 'Ubuntu Mono', 'Courier New', 'andale mono', 'lucida console', monospace;background-color:rgb(248,248,248);border:1px solid rgb(238,238,238);font-size:13px;line-height:19px;color:rgb(51,51,51);">Builder.setFlag           : 设置标识
Builder.setForegroundColor: 设置前景色
B

10-07 12:43