/AndroidUtilCode

Android developers should collect the following utils(updating)

Primary LanguageJava

Android developers should collect the following utils

中文版README


Directory is shown below:

  • About App→AppUtils.java
  • getInstallAppIntent
  • getUninstallAppIntent
  • getOpenAppItent
  • getAppInfoIntent
  • getShareInfoIntent
  • isInstallApp
  • getAppInfo
  • getAllAppsInfo
  • isAppBackground
  • About Convert→ConvertUtils.javaTest
  • bytes2HexStringhexString2Bytes
  • chars2Bytesbytes2Chars
  • byte2Sizesize2Byte
  • byte2FitSize
  • input2OutputStreamoutput2InputStream
  • inputStream2Bytesbytes2InputStream
  • outputStream2Bytesbytes2OutputStream
  • inputStream2Stringstring2InputStream
  • outputStream2Stringstring2OutputStream
  • bitmap2Bytesbytes2Bitmap
  • drawable2Bitmapbitmap2Drawable
  • drawable2Bytesbytes2Drawable
  • dp2pxpx2dp
  • sp2pxpx2sp
  • About Encode→EncodeUtils.javaTest
  • urlEncode
  • urlDecode
  • base64Encodebase64Encode2String
  • base64Decode
  • base64UrlSafeEncode
  • htmlEncode
  • htmlDecode
  • About Encrypt→EncryptUtils.javaTest
  • encryptMD2ToStringencryptMD2
  • encryptMD5ToStringencryptMD5
  • encryptSHA1ToStringencryptSHA1
  • encryptSHA224ToStringencryptSHA224
  • encryptSHA256ToStringencryptSHA256
  • encryptSHA384ToStringencryptSHA384
  • encryptSHA512ToStringencryptSHA512
  • encryptMD5File2StringencryptMD5File
  • encryptDES2Base64
  • encryptDES2HexString
  • encryptDES
  • decryptBase64DES
  • decryptHexStringDES
  • decryptDES
  • encrypt3DES2Base64
  • encrypt3DES2HexString
  • encrypt3DES
  • decryptBase64_3DES
  • decryptHexString3DES
  • decrypt3DES
  • encryptAES2Base64
  • encryptAES2HexString
  • encryptAES
  • decryptBase64AES
  • decryptHexStringAES
  • decryptAES
  • About File→FileUtils.javaTest
  • getFileByPath
  • isFileExists
  • isDir
  • isFile
  • createOrExistsDir
  • createOrExistsFile
  • createFileByDeleteOldFile
  • copyDir
  • copyFile
  • moveDir
  • moveFile
  • deleteDir
  • deleteFile
  • listFilesInDir
  • listFilesInDir
  • listFilesInDirWithFilter
  • listFilesInDirWithFilter
  • listFilesInDirWithFilter
  • listFilesInDirWithFilter
  • searchFileInDir
  • writeFileFromIS
  • writeFileFromString
  • getFileCharsetSimple
  • getFileLines
  • readFile2List
  • readFile2SB
  • getFileSize
  • getFileMD5
  • closeIO
  • getDirName
  • getFileName
  • getFileNameNoExtension
  • getFileExtension
  • About Image→ImageUtils.java
  • bitmap2Bytesbytes2Bitmap
  • drawable2Bitmapbitmap2Drawable
  • drawable2Bytesbytes2Drawable
  • getBitmap
  • scale
  • clip
  • skew
  • rotate
  • getRotateDegree
  • toRound
  • toRoundCorner
  • fastBlur
  • renderScriptBlur
  • stackBlur
  • addFrame
  • addReflection
  • addTextWatermark
  • addImageWatermark
  • toAlpha
  • toGray
  • save
  • isImage
  • getImageType
  • compressByScale
  • compressByQuality
  • compressBySampleSize
  • About Keyboard→KeyboardUtils.java
  • hideSoftInput
  • clickBlankArea2HideSoftInput0
  • showSoftInput
  • toggleSoftInput
  • About Network→NetworkUtils.java
  • openWirelessSettings
  • isAvailable
  • isConnected
  • is4G
  • isWifiConnected
  • getNetworkOperatorName
  • getPhoneType
  • getNetWorkTypegetNetWorkTypeName
  • About Phone→PhoneUtils.java
  • isPhone
  • getPhoneIMEI
  • getPhoneStatus
  • dial
  • call
  • sendSms
  • getAllContactInfo
  • getContantNum
  • getAllSMS
  • About Regex→RegexUtils.javaTest
  • isMobileSimple
  • isMobileExact
  • isTel
  • isIDCard15
  • isIDCard18
  • isEmail
  • isURL
  • isChz
  • isUsername
  • isDate
  • isIP
  • isMatch
  • About Screen→ScreenUtils.java
  • getDeviceWidthgetDeviceHeight
  • setTransparentStatusBar
  • hideStatusBar
  • getStatusBarHeight
  • isStatusBarExists
  • getActionBarHeight
  • showNotificationBar
  • hideNotificationBar
  • setLandscape
  • snapShotWithStatusBarsnapShotWithoutStatusBar
  • isScreenLock
  • About SDCard→SDCardUtils.java
  • isSDCardEnable
  • getSDCardPath
  • getDataPath
  • getFreeSpace
  • About Size→SizeUtils.java
  • dp2pxpx2dp
  • sp2pxpx2sp
  • applyDimension
  • forceGetViewSize
  • measureView
  • About SP→SPUtils.javaTest
  • SPUtils
  • putString
  • getString
  • putInt
  • getInt
  • putLong
  • getLong
  • putFloat
  • getFloat
  • putBoolean
  • getBoolean
  • getAll
  • remove
  • contains
  • clear
  • About String→StringUtils.javaTest
  • isEmpty
  • isSpace
  • null2Length0
  • length
  • upperFirstLetter
  • lowerFirstLetter
  • reverse
  • toDBC
  • toSBC
  • About ThreadPool→ThreadPoolUtils.java
  • ThreadPoolUtils
  • execute
  • execute
  • shutDown
  • shutDownNow
  • isShutDown
  • isTerminated
  • awaitTermination
  • submit
  • submit
  • invokeAllinvokeAny
  • schedule
  • schedule
  • scheduleWithFixedRatescheduleWithFixedDelay
  • About Time→TimeUtils.javaTest
  • milliseconds2String
  • string2Milliseconds
  • string2Date
  • date2String
  • date2Milliseconds
  • milliseconds2Date
  • milliseconds2Unit
  • getIntervalTime
  • getCurTimeMillsgetCurTimeStringgetCurTimeDate
  • getIntervalByNow
  • isLeapYear
  • About Zip→ZipUtils.javaTest
  • zipFiles
  • zipFile
  • unzipFiles
  • unzipFile
  • unzipFileByKeyword
  • getFilesPath
  • getComments
  • getEntries

I'm so sorry for that the code is annotated with Chinese.

Download


Gradle:

compile 'com.blankj:utilcode:1.2.1'

Proguard


-keep class com.blankj.utilcode.** { *; }
-keep classmembers class com.blankj.utilcode.** { *; }
-dontwarn com.blankj.utilcode.**

License


Copyright 2016 Blankj

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.