更新啦!已更新到1.8.5!已經完全支持JCenter,后續不再支持JitPack方式編譯。
- Colors類,包含上千種顏色
- FlowLayout 流式布局
AuthEditText 類似支付寶的密碼輸入控件(最新版已棄用,請使用 NewAuthEditText)
- QuickIndexView 類似微信右側字母快速導航條
- NewAuthEditText 類似支付寶的密碼輸入控件(修改了 AuthEditText 中不合理的重寫方法,布局文件預覽不正常,沒有自定義屬性等多個問題,擴展了自定義屬性功能)
- Managers 類,系統Service類不用通過Context獲取后還要強轉類型
- 其他代碼優化和Bug修改
使用
(有關Context類: 先在 'Application.onCreate()' 中調用 'Easy.getDefault().init(this);')
直接使用類型轉換,Managers,
編譯
JCenter
compile 'com.ayvytr:EasyAndroid:1.8.5'
包含
資源
從 -300~300 dp 和 sp 資源,無需創建,直接使用
有關TextView等View的Style
自定義View (有關TextView的類可能作用不大)
CenterGravityTextView
LeftCenterGravityTextView
RightCenterGravityTextView
SeekBarPressure: 雙Thumb的SeekBar
Tool classes with out Context
Convert 類型轉換類,仿照了C#的Convert類(對這個類情(zhen)有(de)獨(hao)鐘(yong))
提供了大部分基本類型到bool,int,byte的轉換,以及isZero方法
toBool
izZero
toInt
toByte
EncodeTool 編碼解碼相關操作類
urlEncode
urlDecode
base64Encode
base64Decode
base64UrlSafeEncode
htmlEncode
htmlDecode
EncryptTool 加密解密相關操作類
encryptMD2ToString
encryptMD2
encryptMD5ToString
encryptMD5
encryptSHA1ToString
encryptSHA1
encryptSHA224ToString
encryptSHA224
encryptSHA256ToString
encryptSHA256
encryptSHA384ToString
encryptSHA384
encryptSHA512ToString
encryptSHA512
hashTemplate
encryptHmacMD5ToString
encryptHmacMD5
encryptHmacSHA1ToString
encryptHmacSHA1
encryptHmacSHA224ToString
encryptHmacSHA224
encryptHmacSHA256ToString
encryptHmacSHA256
encryptHmacSHA384ToString
encryptHmacSHA384
encryptHmacSHA512ToString
encryptHmacSHA512
hmacTemplate
encryptDES2Base64
encryptDES2HexString
encryptDES
decryptBase64DES
decryptHexStringDES
decryptDES
encrypt3DES2Base64
encrypt3DES2HexString
encrypt3DES
decryptBase64_3DES
decryptHexString3DES
decrypt3DES
encryptAES2Base64
encryptAES2HexString
encryptAES
decryptBase64AES
decryptHexStringAES
decryptAES
desTemplate
bytes2HexString
hexString2Bytes
hex2Dec
base64Encode
base64Decode
FileTool 文件操作類,判斷是不是文件/目錄,是不是存在,重命名,創建文件/目錄,列出文件/目錄,
獲取文件名/文件標題(不包含擴展名), 有沒有擴展名,讀/寫文件等方法
createDir
createFile
fromName
getByteArray
getExtension
getExtension
getLastModified
getLowerName
getName
getNamesExtensionsList
getNamesList
getTitle
hasExtension
isDir
isExists
isFile
isTyped
listAll
listAllDirs
listAllDirsDislikeNames
listAllDirsDislikeNamesNoCase
listAllDirsLikeNames
listAllDirsLikeNamesNoCase
listAllDirsWithNames
listAllDirsWithNamesNoCase
listAllDirsWithoutNames
listAllDirsWithoutNamesNoCase
listAllDislikeNames
listAllDislikeNamesNoCase
listAllLikeNames
listAllLikeNamesNoCase
listAllWithExtension
listAllWithNames
listAllWithNamesNoCase
listAllWithoutExtension
listAllWithoutNames
listAllWithoutNamesNoCase
listDirs
listDirsDislikeNames
listDirsDislikeNamesNoCase
listDirsLikeNames
listDirsLikeNamesNoCase
listDirsWithNames
listDirsWithNamesNoCase
listDirsWithoutNames
listDirsWithoutNamesNoCase
listFiles
listFilesDislikeNames
listFilesDislikeNamesNoCase
listFilesLikeNames
listFilesLikeNamesNoCase
listFilesNames
listFilesPaths
listFilesWithExtension
listFilesWithNames
listFilesWithNamesNoCase
listFilesWithoutExtension
listFilesWithoutNames
listFilesWithoutNamesNoCase
of
open
read
readFile
rename
toFileNames
toFilePaths
write
writeFile
RegexTool 正則工具類,包括驗證手機號,郵箱,身份證號碼等
isMobileSimple
isMobileExact
isTel
isIDCard15
isIDCard18
isEmail
isURL
isZh
isUsername
isDate
isIP
isMatch
getMatches
getSplits
getReplaceFirst
getReplaceAll
TextTool 提供了眾多的字符串操作功能,包括判空,是不是字符串,分割字符串(會去掉末尾的regex)等功能
isEmpty
isDigit
isNumber
reverse
emptyString
split
isBlank
Tool classes with Context
Easy 這個庫的單例入口類, 使用有關Context的類之前,需要初始化這個類
getContext
checkInitState
getDefault
init
release
getClipboardManager
getWindowManager
getKeyguardManager
BarTool StatusBar, ActionBar操作工具類
setColor
setColorForSwipeBack
setColorNoTranslucent
setColorDiff
setTranslucent
setTranslucentForCoordinatorLayout
setTransparent
setTranslucentDiff
setColorForDrawerLayout
setColorNoTranslucentForDrawerLayout
setColorForDrawerLayout
setColorForDrawerLayoutDiff
setTranslucentForDrawerLayout
setTranslucentForDrawerLayoutDiff
setTransparentForImageView
setTranslucentForImageViewInFragment
clearPreviousSetting
addTranslucentView
createStatusBarView
setRootView
setTransparentForWindow
transparentStatusBar
createTranslucentStatusBarView
getStatusBarHeight
calculateStatusColor
setTransparentStatusBar
hideStatusBar
isStatusBarExists
getActionBarHeight
showNotificationBar
hideNotificationBar
invokePanels
ClipboardTool 剪貼板操作類
setText
getText
getText
setUri
getUri
setIntent
getIntent
DensityTool Dp - Px 相互轉化類,提供了int,float,double 3種類型的重載方法,盡可能減少外部強制類型轉換.
px2dp
dp2px
IntentTool 獲取常用的Intent
getInstallAppIntent
getUninstallAppIntent
getLaunchAppIntent
getAppDetailsSettingsIntent
getShareTextIntent
getShareImageIntent
getComponentIntent
getShutdownIntent
getDialIntent
getCallIntent
getSendSmsIntent
getCaptureIntent
ResTool 獲取資源中Drawable,String,dimension,color, Configuration.
getDrawable
getString
getDimen
getDimenFloat
getDimenToDp
getDimenFloatToDp
getColor
getConfiguration
ScreenTool 提供了獲取屏幕尺寸,寬高,屏幕旋轉方向,設置為豎屏,是不是橫屏/豎屏,獲取屏幕截圖(包含/不包含狀態欄), 判斷是不是鎖屏的功能.
getDisplayMetrics
getScreenWidth
getScreenHeight
setLandscape
setPortrait
isLandscape
isPortrait
getScreenRotationAngle
getRotationAngle
captureWithStatusBar
captureWithoutStatusBar
isScreenLock
ToastTool Toast工具類,提供簡便的Toast創建和輸出功能
make
makeLong
show
showLong
庫的測試類
ConvertTest
FileToolTest
TextToolTest
DensityToolTest
RegexToolTest
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。