{"id":46539054,"url":"https://github.com/yutils/kotlinx","last_synced_at":"2026-03-07T00:30:48.984Z","repository":{"id":65507835,"uuid":"541461699","full_name":"yutils/kotlinx","owner":"yutils","description":"采用kotlin扩展方法。增加易用性。 举例：\"你好\".toast()   举例：\"日志\".logI()","archived":false,"fork":false,"pushed_at":"2025-11-28T01:41:41.000Z","size":405,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-29T22:56:25.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/yutils.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-26T07:32:48.000Z","updated_at":"2025-11-27T06:44:38.000Z","dependencies_parsed_at":"2024-12-06T04:20:30.126Z","dependency_job_id":"a270eb68-24b6-455b-9b86-cf4f63d587aa","html_url":"https://github.com/yutils/kotlinx","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/yutils/kotlinx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutils%2Fkotlinx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutils%2Fkotlinx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutils%2Fkotlinx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutils%2Fkotlinx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yutils","download_url":"https://codeload.github.com/yutils/kotlinx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yutils%2Fkotlinx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30204154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-03-07T00:30:48.405Z","updated_at":"2026-03-07T00:30:48.946Z","avatar_url":"https://github.com/yutils.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kotlinx\n\n## kotlin扩展方法\n\n几乎全采用kotlin扩展方法的方式来扩展kotlin功能。增加易用性。\n\n# 希望更多小伙伴加入和我一起扩充\n\n[![platform](https://img.shields.io/badge/platform-Android-lightgrey.svg)](https://developer.android.google.cn/studio/index.html)\n![Gradle](https://img.shields.io/badge/Gradle-9.0.0-brightgreen.svg)\n[![last commit](https://img.shields.io/github/last-commit/yutils/kotlinx.svg)](https://github.com/yutils/kotlinx/commits/master)\n![repo size](https://img.shields.io/github/repo-size/yutils/kotlinx.svg)\n![android studio](https://img.shields.io/badge/android%20studio-2025.1.2-green.svg)\n[![maven](https://img.shields.io/badge/maven-address-green.svg)](https://search.maven.org/artifact/com.kotlinx/kotlinx)\n\n## 已经从jitpack.io仓库移动至maven中央仓库\n\n**[releases里面有AAR包。点击前往](https://github.com/yutils/kotlinx/releases)**\n\n## Gradle 引用\n\n[添加依赖，当前最新版：————\u003e 1.1.7　　　　![最新版](https://img.shields.io/badge/%E6%9C%80%E6%96%B0%E7%89%88-1.1.7-green.svg)](https://search.maven.org/artifact/com.kotlinx/kotlinx)\n\n```\ndependencies {\n     //更新地址  https://github.com/yutils/kotlinx 建议过几天访问看下有没有新版本\n     implementation 'com.kotlinx:kotlinx:1.1.7'\n}\n```\n\n注：如果引用失败，看下面方案\n\n```\nallprojects {\n    repositories {\n     //如果拉取不了，再加入\n     maven { url 'http://maven.kotlinx.com:8081/repository/maven-public'; allowInsecureProtocol = true }\n    }\n```\n\nGithub地址：[https://github.com/yutils/kotlinx](https://github.com/yutils/kotlinx)\n\n我的CSDN：[https://blog.csdn.net/Yu1441](https://blog.csdn.net/Yu1441)\n\n感谢关注微博：[细雨若静](https://weibo.com/32005200)\n\n### 引入\n\n```kotlin\n//在application或者MainActivity中加入\nKotlinx.init(application)\n```\n\n### 举例：\n\n```kotlin\n\n//在ui线程弹出一个toast\n\"你好\".toast()\n\n//调用TTS语音\n\"你好\".speak()\n\n//打印日志\n\"你好\".logI()\n\n//toast，tts，日志，显示行号\n\"错误\".toast().speak().logE().showStackTrace()\n\n//判断字符串是否是int\n\"123\".isInt()\n\n//判断是否是IPv4地址\n\"192.168.1.1\".isIPv4()\n\n//将字符串写入文件\n\"你好\".toFile(File(\"D:/abc.txt\"))\n\n//将字符串转换成base64\n\"你好\".toBase64String()\n\n//将base64字符串转换成String\n\"5L2g5aW9\".toStringFromBase64()\n\n//读取文件并返回String\nvar s = File(\"D:/abc.txt\").toString()\n\n//将bitmap转换成ByteArray\nbitmap.toByteArray()\n\n//给textView增加跑马灯效果\ntextView.marquee()\n\n//将bitmap转化成byte数组\nbitmap.toByteArray()\n\n//recyclerView使用\nval list = listOf(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\")\nrecyclerView.show(R.layout.user_item, list) { holder, position -\u003e\n    val binding = holder.binding as UserItemBinding\n    val item = list[position]\n}.onItemClickListener = { position -\u003e\n    \"第${position}行被点击了\".toast()\n}\n\n//滑动完成后，能看到顶部，下拉刷新\nrecyclerView.scrollToTopListener {\n    //刷新逻辑\n}\n\n//滑动完成后能看到底部监听，上拉加载\nrecyclerView.scrollToBottomListener {\n    //加载逻辑\n}\n//点击防抖\nview.debounceClick {\n    \n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyutils%2Fkotlinx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyutils%2Fkotlinx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyutils%2Fkotlinx/lists"}