@@ -6,7 +6,7 @@ Directory is shown below:
6
6
```
7
7
isActivityExists
8
8
launchActivity
9
- getLauncherActivity
9
+ getLauncherActivity: 获取入口activity
10
10
```
11
11
12
12
> - ** About App→[ AppUtils.java] [ app.java ] →[ Demo] [ app.demo ] **
@@ -20,7 +20,7 @@ isAppRoot
20
20
launchApp
21
21
closeApp
22
22
getAppPackageName
23
- getAppDetailsSettings
23
+ getAppDetailsSettings: 获取App具体设置
24
24
getAppName
25
25
getAppIcon
26
26
getAppPath
@@ -39,7 +39,7 @@ cleanAppData
39
39
40
40
> - ** About Bar→[ BarUtils.java] [ bar.java ] **
41
41
```
42
- setTransparentStatusBar
42
+ setTransparentStatusBar: 设置透明状态栏(api大于19方可使用)
43
43
hideStatusBar
44
44
getStatusBarHeight
45
45
isStatusBarExists
@@ -53,7 +53,7 @@ hideNotificationBar
53
53
cleanInternalCache
54
54
cleanInternalFiles
55
55
cleanInternalDbs
56
- cleanInternalDbByName
56
+ cleanInternalDbByName: 根据名称清除数据库
57
57
cleanInternalSP
58
58
cleanExternalCache
59
59
cleanCustomCache
@@ -65,19 +65,19 @@ copyText
65
65
getText
66
66
copyUri
67
67
getUri
68
- copyIntent
68
+ copyIntent: 复制意图到剪贴板
69
69
getIntent
70
70
```
71
71
72
72
> - ** About Close→[ CloseUtils.java] [ close.java ] **
73
73
```
74
74
closeIO
75
- closeIOQuietly
75
+ closeIOQuietly: 安静关闭IO
76
76
```
77
77
78
78
> - ** About Const→[ ConstUtils.java] [ const.java ] **
79
79
```
80
- MemoryConst
80
+ MemoryConst: 存储相关常量
81
81
TimeConst
82
82
RegexConst
83
83
```
@@ -95,7 +95,7 @@ input2OutputStream, output2InputStream
95
95
inputStream2Bytes, bytes2InputStream
96
96
outputStream2Bytes, bytes2OutputStream
97
97
inputStream2String, string2InputStream
98
- outputStream2String, string2OutputStream
98
+ outputStream2String, string2OutputStream: outputStream与string按编码互转
99
99
bitmap2Bytes, bytes2Bitmap
100
100
drawable2Bitmap, bitmap2Drawable
101
101
drawable2Bytes, bytes2Drawable
@@ -106,7 +106,7 @@ sp2px, px2sp
106
106
107
107
> - ** About Crash→[ CrashUtils.java] [ crash.java ] **
108
108
```
109
- getInstance
109
+ getInstance: 获取单例
110
110
init
111
111
```
112
112
@@ -121,20 +121,20 @@ getModel
121
121
shutdown
122
122
reboot
123
123
reboot2Recovery
124
- reboot2Bootloader
124
+ reboot2Bootloader: 重启到bootloader
125
125
```
126
126
127
127
> - ** About Empty→[ EmptyUtils.java] [ empty.java ] →[ Test] [ empty.test ] **
128
128
```
129
129
isEmpty
130
- isNotEmpty
130
+ isNotEmpty: 判断对象是否非空
131
131
```
132
132
133
133
> - ** About Encode→[ EncodeUtils.java] [ encode.java ] →[ Test] [ encode.test ] **
134
134
```
135
135
urlEncode
136
136
urlDecode
137
- base64Encode, base64Encode2String
137
+ base64Encode, base64Encode2String: Base64编码
138
138
base64Decode
139
139
base64UrlSafeEncode
140
140
htmlEncode
@@ -159,7 +159,7 @@ encryptHmacSHA384, encryptHmacSHA384ToString
159
159
encryptHmacSHA512, encryptHmacSHA512ToString
160
160
encryptDES, encryptDES2HexString, encryptDES2Base64
161
161
decryptDES, decryptHexStringDES, decryptBase64DES
162
- encrypt3DES, encrypt3DES2HexString, encrypt3DES2Base64
162
+ encrypt3DES, encrypt3DES2HexString, encrypt3DES2Base64: 3DES加密
163
163
decrypt3DES, decryptHexString3DES, decryptBase64_3DES
164
164
encryptAES, encryptAES2HexString, encryptAES2Base64
165
165
decryptAES, decryptHexStringAES, decryptBase64AES
@@ -190,15 +190,17 @@ listFilesInDirWithFilter
190
190
searchFileInDir
191
191
writeFileFromIS
192
192
writeFileFromString
193
+ readFile2List
194
+ readFile2String
195
+ readFile2Bytes
196
+ getFileLastModified
193
197
getFileCharsetSimple
194
198
getFileLines
195
- readFile2List
196
- readFile2SB
197
199
getDirSize
198
200
getFileSize
199
201
getDirLength
200
202
getFileLength
201
- getFileMD5, getFileMD5ToString
203
+ getFileMD5, getFileMD5ToString: 获取文件的MD5校验码
202
204
getDirName
203
205
getFileName
204
206
getFileNameNoExtension
@@ -207,13 +209,13 @@ getFileExtension
207
209
208
210
> - ** About Handler→[ HandlerUtils.java] [ handler.java ] →[ Demo] [ handler.demo ] **
209
211
```
210
- HandlerHolder
212
+ HandlerHolder: 使用必读
211
213
```
212
214
213
215
> - ** About Image→[ ImageUtils.java] [ image.java ] →[ Demo] [ image.demo ] **
214
216
```
215
217
bitmap2Bytes, bytes2Bitmap
216
- drawable2Bitmap, bitmap2Drawable
218
+ drawable2Bitmap, bitmap2Drawable: drawable与bitmap互转
217
219
drawable2Bytes, bytes2Drawable
218
220
getBitmap
219
221
scale
@@ -245,7 +247,7 @@ compressBySampleSize
245
247
getInstallAppIntent
246
248
getUninstallAppIntent
247
249
getLaunchAppIntent
248
- getAppDetailsSettingsIntent
250
+ getAppDetailsSettingsIntent: 获取App具体设置的意图
249
251
getShareTextIntent
250
252
getShareImageIntent
251
253
getComponentIntent
@@ -256,15 +258,15 @@ getCaptureIntent
256
258
> - ** About Keyboard→[ KeyboardUtils.java] [ keyboard.java ] →[ Demo] [ keyboard.demo ] **
257
259
```
258
260
hideSoftInput
259
- clickBlankArea2HideSoftInput
261
+ clickBlankArea2HideSoftInput: 点击屏幕空白区域隐藏软键盘
260
262
showSoftInput
261
263
toggleSoftInput
262
264
```
263
265
264
266
> - ** About Location→[ LocationUtils.java] [ location.java ] →[ Demo] [ location.demo ] **
265
267
```
266
268
isGpsEnabled
267
- isLocationEnabled
269
+ isLocationEnabled: 判断定位是否可用
268
270
openGpsSettings
269
271
register
270
272
unregister
@@ -277,7 +279,7 @@ getStreet
277
279
> - ** About Log→[ LogUtils.java] [ log.java ] →[ Test] [ log.test ] **
278
280
```
279
281
init
280
- getBuilder
282
+ getBuilder: 获取LogUtils建造者
281
283
v
282
284
d
283
285
i
@@ -297,7 +299,7 @@ getWifiEnabled
297
299
setWifiEnabled
298
300
isWifiConnected
299
301
isWifiAvailable
300
- getNetworkOperatorName
302
+ getNetworkOperatorName: 获取移动网络运营商名称
301
303
getNetworkType
302
304
getIPAddress
303
305
getDomainAddress
@@ -310,7 +312,7 @@ getIMEI
310
312
getIMSI
311
313
getPhoneType
312
314
isSimCardReady
313
- getSimOperatorName, getSimOperatorByMnc
315
+ getSimOperatorName, getSimOperatorByMnc: 获取Sim卡运营商名称
314
316
getPhoneStatus
315
317
dial
316
318
call
@@ -323,14 +325,17 @@ getAllSMS
323
325
324
326
> - ** About Pinyin→[ PinyinUtils.java] [ pinyin.java ] →[ Test] [ pinyin.test ] **
325
327
```
326
- getPinyinFirstLetter
327
328
ccs2Pinyin
329
+ ccs2Pinyin
330
+ getPinyinFirstLetter
331
+ getPinyinFirstLetters: 获取所有汉字的首字母
332
+ surname2Pinyin
328
333
```
329
334
330
335
> - ** About Process→[ ProcessUtils.java] [ process.java ] →[ Demo] [ process.demo ] **
331
336
```
332
337
getForegroundProcessName
333
- cleanAllBackgroundProcesses, cleanBackgroundProcesses
338
+ cleanAllBackgroundProcesses, cleanBackgroundProcesses: 清理后台服务进程
334
339
```
335
340
336
341
> - ** About Regex→[ RegexUtils.java] [ regex.java ] →[ Test] [ regex.test ] **
349
354
isMatch
350
355
getMatches
351
356
getSplits
352
- getReplaceFirst
357
+ getReplaceFirst: 替换正则匹配的第一部分
353
358
getReplaceAll
354
359
```
355
360
@@ -363,13 +368,13 @@ isLandscape
363
368
isPortrait
364
369
getScreenRotation
365
370
captureWithStatusBar
366
- captureWithoutStatusBar
371
+ captureWithoutStatusBar: 获取当前屏幕截图,不包含状态栏
367
372
isScreenLock
368
373
```
369
374
370
375
> - ** About SDCard→[ SDCardUtils.java] [ sdcard.java ] →[ Demo] [ sdcard.demo ] **
371
376
```
372
- isSDCardEnable
377
+ isSDCardEnable: 判断SD卡是否可用
373
378
getSDCardPath
374
379
getDataPath
375
380
getFreeSpace
@@ -378,7 +383,7 @@ getSDCardInfo
378
383
379
384
> - ** About Service→[ ServiceUtils.java] [ service.java ] **
380
385
```
381
- getAllRunningService
386
+ getAllRunningService: 获取所有运行的服务
382
387
startService
383
388
stopService
384
389
bindService
@@ -388,7 +393,7 @@ isServiceRunning
388
393
389
394
> - ** About Shell→[ ShellUtils.java] [ shell.java ] **
390
395
```
391
- execCmd
396
+ execCmd: 是否是在root下执行命令
392
397
```
393
398
394
399
> - ** About Size→[ SizeUtils.java] [ size.java ] **
@@ -399,14 +404,14 @@ applyDimension
399
404
forceGetViewSize
400
405
measureView
401
406
getMeasuredWidth
402
- getMeasuredHeight
407
+ getMeasuredHeight: 获取测量视图高度
403
408
```
404
409
405
410
> - ** About Snackbar→[ SnackbarUtils.java] [ snackbar.java ] →[ Demo] [ snackbar.demo ] **
406
411
```
407
412
showShortSnackbar
408
413
showLongSnackbar
409
- showIndefiniteSnackbar
414
+ showIndefiniteSnackbar: 显示自定义时长snackbar
410
415
addView
411
416
dismissSnackbar
412
417
```
@@ -422,8 +427,8 @@ putLong
422
427
getLong
423
428
putFloat
424
429
getFloat
425
- putBoolean
426
- getBoolean
430
+ putBoolean: SP中写入boolean类型value
431
+ getBoolean: SP中读取boolean
427
432
getAll
428
433
remove
429
434
contains
@@ -435,11 +440,11 @@ clear
435
440
isEmpty
436
441
isSpace
437
442
equals
438
- equalsIgnoreCase
443
+ equalsIgnoreCase: 判断两字符串忽略大小写是否相等
439
444
null2Length0
440
445
length
441
- upperFirstLetter
442
- lowerFirstLetter
446
+ upperFirstLetter: 首字母大写
447
+ lowerFirstLetter: 首字母小写
443
448
reverse
444
449
toDBC
445
450
toSBC
@@ -461,7 +466,7 @@ invokeAll, invokeAny
461
466
schedule
462
467
schedule
463
468
scheduleWithFixedRate
464
- scheduleWithFixedDelay
469
+ scheduleWithFixedDelay: 延迟并以固定休息时间循环执行命令
465
470
```
466
471
467
472
> - ** About Time→[ TimeUtils.java] [ time.java ] →[ Test] [ time.test ] **
@@ -479,7 +484,7 @@ getNowTimeString
479
484
getNowTimeDate
480
485
getTimeSpanByNow
481
486
getFitTimeSpanByNow
482
- getFriendlyTimeSpanByNow
487
+ getFriendlyTimeSpanByNow: 获取友好型与当前时间的差
483
488
isSameDay
484
489
isLeapYear
485
490
getWeek, getWeekIndex
@@ -492,7 +497,7 @@ getZodiac
492
497
> - ** About Toast→[ ToastUtils.java] [ toast.java ] →[ Demo] [ toast.demo ] **
493
498
```
494
499
init
495
- showShortToastSafe
500
+ showShortToastSafe: 安全地显示短时吐司
496
501
showLongToastSafe
497
502
showShortToast
498
503
showLongToast
@@ -505,7 +510,7 @@ zipFiles
505
510
zipFile
506
511
unzipFiles
507
512
unzipFile
508
- unzipFileByKeyword
513
+ unzipFileByKeyword: 解压带有关键字的文件
509
514
getFilesPath
510
515
getComments
511
516
getEntries
0 commit comments