{"id":21839693,"url":"https://github.com/yangchaojiang/utilsdmo","last_synced_at":"2025-04-14T10:40:41.625Z","repository":{"id":202020343,"uuid":"78169278","full_name":"yangchaojiang/UtilsDmo","owner":"yangchaojiang","description":"jsonManager json解析 采用 fastjson  TimeUtils 时间类 除了时间格式化，提供用于视频的时长，和语音的时长的时间格式化  YUtils 类例如 获取屏幕宽","archived":false,"fork":false,"pushed_at":"2017-12-18T10:14:51.000Z","size":6530,"stargazers_count":152,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T23:51:06.505Z","etag":null,"topics":["json","timeutils","toast","yutils"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yangchaojiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-01-06T03:13:45.000Z","updated_at":"2023-07-17T06:11:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"96e8b52d-9f79-4580-a551-923593e29819","html_url":"https://github.com/yangchaojiang/UtilsDmo","commit_stats":null,"previous_names":["yangchaojiang/utilsdmo"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangchaojiang%2FUtilsDmo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangchaojiang%2FUtilsDmo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangchaojiang%2FUtilsDmo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yangchaojiang%2FUtilsDmo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yangchaojiang","download_url":"https://codeload.github.com/yangchaojiang/UtilsDmo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248866386,"owners_count":21174531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","timeutils","toast","yutils"],"created_at":"2024-11-27T21:20:08.815Z","updated_at":"2025-04-14T10:40:41.600Z","avatar_url":"https://github.com/yangchaojiang.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UtilsDmo\n \n ##依赖\n ````\n   compile 'com.ycjiang:Yutils:1.2.0'\n ````\n\nJsonManager  json解析  采用 fastjson\n\nTimeUtils  时间类\n除了时间格式化，提供用于视频的时长，和语音的时长 时间格式化\n\nYUtils 类 例如\n获取屏幕宽高。 Toast 提示（防止重复显示） 是否有网络\n手机是否有虚拟导航，状态栏等 单位互相转换dp,px,sp \n\n\n```java\n\npublic class App extends Application {\n\n    @Override\n    public void onCreate() {\n        super.onCreate();\n        YUtils.initialize(this);\n        YUtils.setGravity(Gravity.CENTER);\n    }\n}\npublic void onViewClicked(View view) {\n        switch (view.getId()) {\n            case R.id.button2:\n                Log.d(\"MainActivity\",\"asdasda\");\n                YUtils.Toast(\"哈哈\");\n                break;\n            case R.id.button3:\n                YUtils.Toast(TimeUtils.getDataTimeCNString(new Date()));\n                break;\n            case R.id.button4:\n                YUtils.Toast(\"是否虚拟导航键：\"+YUtils.isNavigationBarExist2(this));\n                break;\n            case R.id.button5:\n                  String lists= JsonManager.beanToJson(list);\n                YUtils.Toast(\"json：\"+lists);\n                break;\n            case R.id.button6:\n                CountDownTimer cc= TimeUtils.countDown(this, 60, 1, new TimeUtils.CountDownListener() {\n                    @Override\n                    public void onFinish(String text) {\n                        YUtils.Toast(\"onFinish：\"+text);\n                    }\n\n                    @Override\n                    public void onTick(long millisUntilFinished, String text) {\n                        YUtils.Toast(\"onTick：\"+text);\n                    }\n                });\n                break;\n            case R.id.button7:\n                YUtils.Toast(\"视频时长：\"+TimeUtils.getVideoTime(100));\n                break;\n            case R.id.button8:\n                YUtils.Toast(\"视频文件：\"+YUtils.formatFileSizeAll(1500000L));\n                break;\n        }\n      }\n```\n   更多用法请看类库说明，方法都有注释\n ###  1.1.3\n   * 1.修改TimeUtils 方法 get  换成from\n   * 2.YFileUtils 帮助类\n   * 3.增加 网络帮助类NetworkUtils  移除YUtils 网络方法\n   * 4.修改日志 log 类名为Logger\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangchaojiang%2Futilsdmo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyangchaojiang%2Futilsdmo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyangchaojiang%2Futilsdmo/lists"}