{"id":20892699,"url":"https://github.com/aweiloveandroid/refactor-android-support-v4","last_synced_at":"2026-04-30T05:33:10.673Z","repository":{"id":110404143,"uuid":"122802493","full_name":"AweiLoveAndroid/refactor-android-support-v4","owner":"AweiLoveAndroid","description":"重构Android的v4包的部分源码","archived":false,"fork":false,"pushed_at":"2018-02-25T05:20:56.000Z","size":106,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-30T05:33:08.626Z","etag":null,"topics":["android","refactor","support-v4"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AweiLoveAndroid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-02-25T03:40:07.000Z","updated_at":"2018-04-10T14:50:45.000Z","dependencies_parsed_at":"2023-04-13T04:00:36.490Z","dependency_job_id":null,"html_url":"https://github.com/AweiLoveAndroid/refactor-android-support-v4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AweiLoveAndroid/refactor-android-support-v4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AweiLoveAndroid%2Frefactor-android-support-v4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AweiLoveAndroid%2Frefactor-android-support-v4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AweiLoveAndroid%2Frefactor-android-support-v4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AweiLoveAndroid%2Frefactor-android-support-v4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AweiLoveAndroid","download_url":"https://codeload.github.com/AweiLoveAndroid/refactor-android-support-v4/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AweiLoveAndroid%2Frefactor-android-support-v4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32456165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","refactor","support-v4"],"created_at":"2024-11-18T10:13:38.216Z","updated_at":"2026-04-30T05:33:08.932Z","avatar_url":"https://github.com/AweiLoveAndroid.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# refactor-android-support-v4\n重构Android的v4包的部分源码\n\n#### 想了解详细的源码讲解，可以查看我的博客 [老司机带你重构Android的v4包的部分源码](https://www.jianshu.com/p/a08d754944c4)\n\n# 大概重构思路：\n根据我做过项目用到的MVP的开发模式，我把共同的htmlEncode方法和getLayoutDirectionFromLocale方法抽取出一个接口，然后分别用两个实现类去实现接口，然后用TextUtilsCompat这个类去判断调用哪个实现类的方法，这样看起来更直观一些。\n\n# 使用示意图如下：\n\n![](https://github.com/AweiLoveAndroid/refactor-android-support-v4/blob/master/pic/demo.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faweiloveandroid%2Frefactor-android-support-v4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faweiloveandroid%2Frefactor-android-support-v4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faweiloveandroid%2Frefactor-android-support-v4/lists"}