更新啦烂翰!已更新到1.8.5!已經(jīng)完全支持JCenter蚤氏,后續(xù)不再支持JitPack方式編譯甘耿。
- Colors類,包含上千種顏色
- FlowLayout 流式布局
AuthEditText 類似支付寶的密碼輸入控件(最新版已棄用竿滨,請(qǐng)使用 NewAuthEditText)
- QuickIndexView 類似微信右側(cè)字母快速導(dǎo)航條
- NewAuthEditText 類似支付寶的密碼輸入控件(修改了 AuthEditText 中不合理的重寫(xiě)方法佳恬,布局文件預(yù)覽不正常,沒(méi)有自定義屬性等多個(gè)問(wèn)題于游,擴(kuò)展了自定義屬性功能)
- Managers 類毁葱,系統(tǒng)Service類不用通過(guò)Context獲取后還要強(qiáng)轉(zhuǎn)類型
- 其他代碼優(yōu)化和Bug修改
使用
(有關(guān)Context類: 先在 'Application.onCreate()' 中調(diào)用 'Easy.getDefault().init(this);')
直接使用類型轉(zhuǎn)換,Managers贰剥,
編譯
JCenter
compile 'com.ayvytr:EasyAndroid:1.8.5'
包含
資源
從 -300~300 dp 和 sp 資源倾剿,無(wú)需創(chuàng)建,直接使用
有關(guān)TextView等View的Style
自定義View (有關(guān)TextView的類可能作用不大)
CenterGravityTextView
LeftCenterGravityTextView
RightCenterGravityTextView
SeekBarPressure: 雙Thumb的SeekBar
Tool classes with out Context
Convert 類型轉(zhuǎn)換類蚌成,仿照了C#的Convert類(對(duì)這個(gè)類情(zhen)有(de)獨(dú)(hao)鐘(yong))
提供了大部分基本類型到bool前痘,int,byte的轉(zhuǎn)換担忧,以及isZero方法
toBool
izZero
toInt
toByte
EncodeTool 編碼解碼相關(guān)操作類
urlEncode
urlDecode
base64Encode
base64Decode
base64UrlSafeEncode
htmlEncode
htmlDecode
EncryptTool 加密解密相關(guān)操作類
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 文件操作類芹缔,判斷是不是文件/目錄,是不是存在瓶盛,重命名最欠,創(chuàng)建文件/目錄,列出文件/目錄蓬网,
獲取文件名/文件標(biāo)題(不包含擴(kuò)展名), 有沒(méi)有擴(kuò)展名窒所,讀/寫(xiě)文件等方法
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 正則工具類,包括驗(yàn)證手機(jī)號(hào)帆锋,郵箱,身份證號(hào)碼等
isMobileSimple
isMobileExact
isTel
isIDCard15
isIDCard18
isEmail
isURL
isZh
isUsername
isDate
isIP
isMatch
getMatches
getSplits
getReplaceFirst
getReplaceAll
TextTool 提供了眾多的字符串操作功能禽额,包括判空锯厢,是不是字符串,分割字符串(會(huì)去掉末尾的regex)等功能
isEmpty
isDigit
isNumber
reverse
emptyString
split
isBlank
Tool classes with Context
Easy 這個(gè)庫(kù)的單例入口類, 使用有關(guān)Context的類之前脯倒,需要初始化這個(gè)類
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 相互轉(zhuǎn)化類实辑,提供了int,float藻丢,double 3種類型的重載方法剪撬,盡可能減少外部強(qiáng)制類型轉(zhuǎn)換.
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 提供了獲取屏幕尺寸馍佑,寬高,屏幕旋轉(zhuǎn)方向梨水,設(shè)置為豎屏拭荤,是不是橫屏/豎屏,獲取屏幕截圖(包含/不包含狀態(tài)欄)疫诽, 判斷是不是鎖屏的功能.
getDisplayMetrics
getScreenWidth
getScreenHeight
setLandscape
setPortrait
isLandscape
isPortrait
getScreenRotationAngle
getRotationAngle
captureWithStatusBar
captureWithoutStatusBar
isScreenLock
ToastTool Toast工具類舅世,提供簡(jiǎn)便的Toast創(chuàng)建和輸出功能
make
makeLong
show
showLong
庫(kù)的測(cè)試類
ConvertTest
FileToolTest
TextToolTest
DensityToolTest
RegexToolTest
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者