移动开发----Android 开发各种工具类
2016-11-04 11:07
519 查看
【原文地址 点击打开链接】
为方便查找,已进行大致归类,其目录如下所示:
![](https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png)
![](https://camo.githubusercontent.com/8d78e757a2a6e9b8c6fcf693d8288d8a3293a634/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f416e64726f69645574696c436f64652d76312e382e302d627269676874677265656e2e737667)
![](https://camo.githubusercontent.com/f429d3812bd22127d04908cd74587491615bf8da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4150492d31352b2d627269676874677265656e2e737667)
![](https://camo.githubusercontent.com/06bb64ffef06a7af7e35e497ccda31abd19c1efe/68747470733a2f2f7472617669732d63692e6f72672f426c616e6b6a2f416e64726f69645574696c436f64652e7376673f6272616e63683d6d6173746572)
![](https://camo.githubusercontent.com/fbcf65d7a76ad66857b09318118b15d2327dc45e/68747470733a2f2f7777772e696e73696768742e696f2f7265706f42616467652f6769746875622e636f6d2f426c616e6b6a2f416e64726f69645574696c436f6465)
![](https://camo.githubusercontent.com/a9d2657f1b6ae12ccbe153dce45bf3c4d6b82aa5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4170616368652d2d322e302d627269676874677265656e2e737667)
为方便查找,已进行大致归类,其目录如下所示:
![](https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png)
README
of Chinese
API
About
Activity→ActivityUtils.java→Demo
isActivityExists startActivity getLauncherActivity getTopActivity
About
App→AppUtils.java→Demo
isInstallApp installApp installAppSilent uninstallApp uninstallAppSilent isAppRoot launchApp getAppPackageName getAppDetailsSettings getAppName getAppIcon getAppPath getAppVersionName getAppVersionCode isSystemApp isAppDebug getAppSignature getAppSignatureSHA1 isAppForeground getForegroundApp getAppInfo getAppsInfo cleanAppData
About
Bar→BarUtils.java
getStatusBarHeight addMarginTopEqualStatusBarHeight subtractMarginTopEqualStatusBarHeight setStatusBarColor setStatusBarAlpha setStatusBarColor4Drawer setStatusBarAlpha4Drawer getActionBarHeight showNotificationBar hideNotificationBar getNavBarHeight hideNavBar
About
Cache→CacheUtils.java→Test
getInstance put getBytes getString getJSONObject getJSONArray getBitmap getDrawable getParcelable getSerializable getCacheSize getCacheCount remove clear
About
Clean→CleanUtils.java→Demo
cleanInternalCache cleanInternalFiles cleanInternalDbs cleanInternalDbByName cleanInternalSP cleanExternalCache cleanCustomCache
About
Clipboard→ClipboardUtils.java
copyText getText copyUri getUri copyIntent getIntent
About
Close→CloseUtils.java
closeIO closeIOQuietly
About
Convert→ConvertUtils.java→Test
bytes2HexString, hexString2Bytes chars2Bytes, bytes2Chars memorySize2Byte, byte2MemorySize byte2FitMemorySize timeSpan2Millis, millis2TimeSpan millis2FitTimeSpan bytes2Bits, bits2Bytes input2OutputStream, output2InputStream inputStream2Bytes, bytes2InputStream outputStream2Bytes, bytes2OutputStream inputStream2String, string2InputStream outputStream2String, string2OutputStream bitmap2Bytes, bytes2Bitmap drawable2Bitmap, bitmap2Drawable drawable2Bytes, bytes2Drawable view2Bitmap dp2px, px2dp sp2px, px2sp
About
Crash→CrashUtils.java
init
About
Device→DeviceUtils.java→Demo
isDeviceRooted getSDKVersion getAndroidID getMacAddress getManufacturer getModel shutdown reboot reboot2Recovery reboot2Bootloader
About
Empty→EmptyUtils.java→Test
isEmpty isNotEmpty
About
Encode→EncodeUtils.java→Test
urlEncode urlDecode base64Encode base64Encode2String base64Decode base64UrlSafeEncode htmlEncode htmlDecode
About
Encrypt→EncryptUtils.java→Test
encryptMD2, encryptMD2ToString encryptMD5, encryptMD5ToString encryptMD5File, encryptMD5File2String encryptSHA1, encryptSHA1ToString encryptSHA224, encryptSHA224ToString encryptSHA256, encryptSHA256ToString encryptSHA384, encryptSHA384ToString encryptSHA512, encryptSHA512ToString encryptHmacMD5, encryptHmacMD5ToString encryptHmacSHA1, encryptHmacSHA1ToString encryptHmacSHA224, encryptHmacSHA224ToString encryptHmacSHA256, encryptHmacSHA256ToString encryptHmacSHA384, encryptHmacSHA384ToString encryptHmacSHA512, encryptHmacSHA512ToString encryptDES, encryptDES2HexString, encryptDES2Base64 decryptDES, decryptHexStringDES, decryptBase64DES encrypt3DES, encrypt3DES2HexString, encrypt3DES2Base64 decrypt3DES, decryptHexString3DES, decryptBase64_3DES encryptAES, encryptAES2HexString, encryptAES2Base64 decryptAES, decryptHexStringAES, decryptBase64AES
About
FileIO→FileIOUtils.java→Test
writeFileFromIS writeFileFromBytesByStream writeFileFromBytesByChannel writeFileFromBytesByMap writeFileFromString readFile2List readFile2String readFile2BytesByStream readFile2BytesByChannel readFile2BytesByMap setBufferSize
About
File→FileUtils.java→Test
getFileByPath isFileExists rename isDir isFile createOrExistsDir createOrExistsFile createFileByDeleteOldFile copyDir copyFile moveDir moveFile deleteDir deleteFile listFilesInDir listFilesInDir listFilesInDirWithFilter listFilesInDirWithFilter listFilesInDirWithFilter listFilesInDirWithFilter searchFileInDir getFileLastModified getFileCharsetSimple getFileLines getDirSize getFileSize getDirLength getFileLength getFileMD5 getFileMD5ToString getDirName getFileName getFileNameNoExtension getFileExtension
About
Fragment→FragmentUtils.java→Demo
addFragment hideAddFragment addFragments removeFragment removeToFragment removeFragments removeAllFragments replaceFragment popFragment popToFragment popFragments popAllFragments popAddFragment hideFragment hideFragments showFragment hideShowFragment getLastAddFragment getLastAddFragmentInStack getTopShowFragment getTopShowFragmentInStack getFragments getFragmentsInStack getAllFragments getAllFragmentsInStack getPreFragment findFragment dispatchBackPress setBackgroundColor setBackgroundResource setBackground
About
Image→ImageUtils.java→Demo
bitmap2Bytes, bytes2Bitmap drawable2Bitmap, bitmap2Drawable drawable2Bytes, bytes2Drawable getBitmap scale clip skew rotate getRotateDegree toRound toRoundCorner fastBlur renderScriptBlur stackBlur addFrame addReflection addTextWatermark addImageWatermark toAlpha toGray save isImage getImageType compressByScale compressByQuality compressBySampleSize
About
Intent→IntentUtils.java
getInstallAppIntent getUninstallAppIntent getLaunchAppIntent getAppDetailsSettingsIntent getShareTextIntent getShareImageIntent getComponentIntent getShutdownIntent getCaptureIntent
About
Keyboard→KeyboardUtils.java→Demo
showSoftInput hideSoftInput toggleSoftInput clickBlankArea2HideSoftInput
About
Log→LogUtils.java→Demo
Builder.setLogSwitch Builder.setConsoleSwitch Builder.setGlobalTag Builder.setLogHeadSwitch Builder.setLog2FileSwitch Builder.setDir Builder.setBorderSwitch Builder.setConsoleFilter Builder.setFileFilter v d i w e a file json xml
About
Network→NetworkUtils.java→Demo
openWirelessSettings isConnected isAvailableByPing getDataEnabled setDataEnabled is4G getWifiEnabled setWifiEnabled isWifiConnected isWifiAvailable getNetworkOperatorName getNetworkType getIPAddress getDomainAddress
About
Phone→PhoneUtils.java→Demo
isPhone getIMEI getIMSI getPhoneType isSimCardReady getSimOperatorName getSimOperatorByMnc getPhoneStatus dial call sendSms sendSmsSilent getAllContactInfo getContactNum getAllSMS
About
Process→ProcessUtils.java→Demo
getForegroundProcessName killAllBackgroundProcesses killBackgroundProcesses
About
Regex→RegexUtils.java→Test
isMobileSimple isMobileExact isTel isIDCard15 isIDCard18 isEmail isURL isZh isUsername isDate isIP isMatch getMatches getSplits getReplaceFirst getReplaceAll
About
Screen→ScreenUtils.java
getScreenWidth getScreenHeight setFullScreen setLandscape setPortrait isLandscape isPortrait getScreenRotation screenShot isScreenLock setSleepDuration getSleepDuration isTablet
About
SDCard→SDCardUtils.java→Demo
isSDCardEnable getSDCardPath getDataPath getFreeSpace getSDCardInfo
About
Service→ServiceUtils.java
getAllRunningService startService stopService bindService unbindService isServiceRunning
About
Shell→ShellUtils.java
execCmd
About
Size→SizeUtils.java
dp2px, px2dp sp2px, px2sp applyDimension forceGetViewSize measureView getMeasuredWidth getMeasuredHeight
About
Snackbar→SnackbarUtils.java→Demo
with setMessage setMessageColor setBgColor setBgResource setDuration setAction setBottomMargin show showSuccess showWarning showError dismiss getView addView
About
Span→SpanUtils.java→Demo
setFlag setForegroundColor setBackgroundColor setLineHeight setQuoteColor setLeadingMargin setBullet setIconMargin setFontSize setFontProportion setFontXProportion setStrikethrough setUnderline setSuperscript setSubscript setBold setItalic setBoldItalic setFontFamily setTypeface setAlign setClickSpan setUrl setBlur setShader setShadow setSpans append appendLine appendImage appendSpace create
About
SP→SPUtils.java→Test
getInstance put getString getInt getLong getFloat getBoolean getAll contains remove clear
About
String→StringUtils.java→Test
isEmpty isTrimEmpty isSpace equals equalsIgnoreCase null2Length0 length upperFirstLetter lowerFirstLetter reverse toDBC toSBC
About
Time→TimeUtils.java→Test
millis2String string2Millis string2Date date2String date2Millis millis2Date getTimeSpan getFitTimeSpan getNowMills getNowString getNowDate getTimeSpanByNow getFitTimeSpanByNow getFriendlyTimeSpanByNow getMillis getString getDate getMillisByNow getStringByNow getDateByNow isToday isLeapYear getChineseWeek getUSWeek getWeekIndex getWeekOfMonth getWeekOfYear getChineseZodiac getZodiac
About
Toast→ToastUtils.java→Demo
setGravity setView getView setBgColor setBgResource setMessageColor showShortSafe showLongSafe showShort showLong showCustomShortSafe showCustomLongSafe showCustomShort showCustomLong cancel
About
Zip→ZipUtils.java→Test
zipFiles zipFile unzipFiles unzipFile unzipFileByKeyword getFilesPath getComments getEntries
About
Log→update_log.md
相关文章推荐
- 【移动开发】Android中各种xml汇总
- 【移动开发】Android中将我们平时积累的工具类打包
- Android 移动开发编程之各种布局属性
- 【移动开发】Android中将我们平时积累的工具类打包
- Android 开发各种工具类
- android开发软件工具类,获取软件的各种属性
- 移动设备界面开发: 专业Android, iPhone, iPad, Palm Pre设计工具箱
- Android UI开发专题(三) 各种Drawable
- Ext JS+Android+SSH整合开发Web与移动SNS
- Ext JS+Android+SSH整合开发Web与移动SNS
- Android应用开发实战-移动终端团购网项目开发(送源代码)
- 机锋科技,中国领先的移动开发商(iPhone开发,Android开发,iPad开发)
- Android领衔:2010年移动开发平台回顾
- Android UI开发专题(三) 各种Drawable
- 【Android游戏开发十八】解放手指,利用传感器开发游戏!(本文讲解在SurfaceView中用重力传感器控制圆球的各方向移动)
- 【Android2D游戏开发十八】解放手指,利用传感器开发游戏!(本文讲解在SurfaceView中用重力传感器控制圆球的各方向移动)
- 关于android移动开发
- Ext JS+Android+SSH整合开发Web与移动SNS
- Android UI开发专题(三) 各种Drawable
- Android UI开发专题(三) 各种Drawable