Skip to content

Commit c551cca

Browse files
committed
[commit] 修改readme
1 parent dd2342b commit c551cca

File tree

1 file changed

+62
-21
lines changed

1 file changed

+62
-21
lines changed

README.md

Lines changed: 62 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ compile 'com.code19.library:library:0.0.5'
77
- 每一个Android开发者在日常开发中都会积累一些自己的代码片段
88
- 目的:
99
* 1.将常用功能模块做成工具类
10-
* 2.将常用第三方框架封装成工具类
10+
* 2.封装Android系统api,简化api的使用
1111
* 3.收集一些高效的正确的代码片段避免下次踩坑
12+
* 4.尽量少依赖第三方
1213
- 能力一般,水平有限,难免有Bug,如果有任何问题,请<a href="https://github.com/h4de5ing/AndroidCommon/issues">反馈</a>
1314
- 如果你有更好的代码,请提交<a href="https://github.com/h4de5ing/AndroidCommon/pulls">Pull request</a>
1415

@@ -33,7 +34,13 @@ compile 'com.code19.library:library:0.0.5'
3334
* installApk 安装应用
3435
* uninstallApk 卸载应用
3536
* isSystemApp 是否是系统应用
36-
37+
* isServiceRunning 服务是否在运行
38+
* stopRunningService 停止服务
39+
* getNumCores 获取Cpu内核数
40+
* killProcesses 结束进程
41+
* runScript 运行脚本
42+
* getRootPermission 获得root权限
43+
3744
- BitmapUtils.java Bitmap工具类
3845
* decodeFile 解析文件为bitmap
3946
* getImageThumbnail 获取图片缩略图
@@ -59,8 +66,7 @@ compile 'com.code19.library:library:0.0.5'
5966
* getTime 获取系统时间
6067
* subtractDate 计算两个时间差
6168
* getDateAfter 得到几天后的时间
62-
* getInterval 类似微博过去时间显示效果
63-
69+
6470
- DensityUtil.java 屏幕工具类
6571
* dip2px dp转像素
6672
* px2dip 像素转dp
@@ -69,6 +75,7 @@ compile 'com.code19.library:library:0.0.5'
6975
* getDialogW 获取dialog宽度
7076
* getScreenW 获取屏幕宽度
7177
* getScreenH 获取屏幕高度
78+
* getScreenRealSize 获取屏幕的真实高度
7279
* getStatusBarH 获取状态栏高度
7380
* getNavigationBarrH 获取导航栏高度
7481

@@ -116,10 +123,8 @@ compile 'com.code19.library:library:0.0.5'
116123
* getUA 获取的浏览器指纹(User-Agent)
117124
* getDensity 获取得屏幕密度
118125
* getGoogleAccounts 获取google账号
119-
* isRunningOnEmulator 当前设备是否是模拟器
120-
* showSoftInputMethod 显示软键盘
121-
* hideSoftInputMethod 隐藏软键盘
122-
126+
127+
123128
- FileUtils.java 文件工具类
124129
* closeIO 关闭IO流
125130
* isFileExist 文件是否存在
@@ -135,7 +140,10 @@ compile 'com.code19.library:library:0.0.5'
135140
* createFolder 创建文件夹(支持覆盖已存在的同名文件夹)
136141
* getFolderName 获取文件夹名称
137142
* deleteFile 删除目录下的文件
138-
143+
* openImage 打开图片
144+
* openVideo 打开视频
145+
* openURL 打开URL
146+
139147
- ImageUtils.java 图片工具类
140148
* calculateInSampleSize 计算图片的压缩比率
141149
* getPictureDegree 获取图片的角度
@@ -162,22 +170,39 @@ compile 'com.code19.library:library:0.0.5'
162170
* isNetworkAvailable 网络可用性
163171
* isWiFi 是否wifi
164172
* openNetSetting 打开网络设置界面
173+
* setWifiEnabled 设置wifi状态
174+
* getWifiScanResults 获取wifi列表
175+
* getScanResultsByBSSID 过滤扫描结果
176+
* getWifiConnectionInfo 获取wifi连接信息
165177

166178
- SPUtils.java SharedPreferences工具
167-
* setBoolean 存储布尔型属性
168-
* getBoolean 获取布尔型属性
169-
* setInt 存储整型属性
170-
* getInt 获取整型属性
171-
* setString 存储字符串型属性
172-
* getString 获取字符串属性
173-
179+
* setSP 存储SharedPreferences值
180+
* getSp 获取SharedPreferences值
181+
* cleanAllSP 清除所有的SP值
182+
183+
- StringUtils.java 字符串工具
184+
* getChsAscii 汉字转成ASCII码
185+
* convert 单字解析
186+
* getSelling 词组解析
187+
* parseEmpty 将null转化为""
188+
* isEmpty 是否是空字符串
189+
* chineseLength 中文长度
190+
* strLength 字符串长度
191+
* subStringLength 获取指定长度的字符所在位置
192+
* isChinese 是否是中文
193+
* isContainChinese 是否包含中文
194+
* strFormat2 不足2位前面补0
195+
174196
- SystemUtils.java 系统工具
175197
* sendSMS 调用系统发送短信
176-
* forwardToDial 跳转到拨号页面
198+
* forwardToDial 跳转到拨号
199+
* sendMail 发邮件
177200
* hideKeyBoard 隐藏系统键盘
178201
* isBackground 判断当前应用程序是否后台运行
179202
* isSleeping 判断手机是否处理睡眠
180203
* installApk 安装apk
204+
* isRooted 是否root
205+
* isRunningOnEmulator 当前设备是否是模拟器
181206
* getAppVersionName 获取当前应用程序的版本名称
182207
* getAppVersionCode 获取当前应用程序的版本号
183208
* goHome 返回Home
@@ -191,7 +216,12 @@ compile 'com.code19.library:library:0.0.5'
191216
* shareFile 分享文件(此方法是调用FileUtils.shareFile中的方式)
192217
* getShareTargets 获取可接受分享的应用
193218
* getCurrentLanguage 获取当前系统的语言
194-
* getLanguage 获取当前系统的语言
219+
* getLanguage 获取当前系统的语言
220+
* isGpsEnabled GPS是否打开
221+
* showSoftInputMethod 显示软键盘
222+
* closeSoftInputMethod 关闭软键盘
223+
* showSoftInput 显示软键盘
224+
* closeSoftInput 关闭软键盘
195225

196226
- VerificationUtils.java 验证工具类
197227
* matcherRealName 判断姓名格式
@@ -214,15 +244,24 @@ compile 'com.code19.library:library:0.0.5'
214244
* testRegex 是否匹配正则
215245
216246
- ViewUtils.java View工具
247+
* removeSelfFromParent
248+
* requestLayoutParent
249+
* isTouchInView
250+
* bigImage
251+
* setTVUnderLine 给TextView设置下划线
252+
* showPopupWindow
253+
* dismissPopup
217254
* captureView 截图
218255
* createViewBitmap 截图
219256
* convertViewToBitmap 截图
220257
* getActivityBitmap 获取Activity的截图
221258
* getStatusBarHeight 获取状态栏高度
222259
* getToolbarHeight 获取工具栏高度
223260
* getNavigationBarHeight 获取导航栏高度
224-
* getScreenSize 获取屏幕尺寸
225-
261+
* measureView 测量view
262+
* getViewWidth 获取view的宽度
263+
* getViewHeight 获取view的高度
264+
226265
227266
228267
```shell
@@ -258,7 +297,9 @@ compile 'com.code19.library:library:0.0.5'
258297
* @since 2.0
259298
*/
260299
```
261-
300+
301+
# 这个库参考了众多网络的中的代码,在此对这些无私奉献的人致以最诚挚的感谢。
302+
262303
License
263304
----
264305

0 commit comments

Comments
 (0)