{"id":13848418,"url":"https://github.com/gpfduoduo/RadarScanView","last_synced_at":"2025-07-12T13:30:59.132Z","repository":{"id":36725142,"uuid":"41031713","full_name":"gpfduoduo/RadarScanView","owner":"gpfduoduo","description":"android下自定义View之雷达扫描 The Radar (Scanning) View on Android 当扫描到对象的时候，通过水波纹的方式显示扫描到的对象，可以动态的随机添加，并且扫描到的对象是可以点击的……","archived":false,"fork":false,"pushed_at":"2015-11-22T04:19:13.000Z","size":4097,"stargazers_count":617,"open_issues_count":2,"forks_count":163,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-08-05T19:35:35.231Z","etag":null,"topics":[],"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/gpfduoduo.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}},"created_at":"2015-08-19T12:10:09.000Z","updated_at":"2024-07-20T11:30:47.000Z","dependencies_parsed_at":"2022-09-07T23:20:37.803Z","dependency_job_id":null,"html_url":"https://github.com/gpfduoduo/RadarScanView","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpfduoduo%2FRadarScanView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpfduoduo%2FRadarScanView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpfduoduo%2FRadarScanView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpfduoduo%2FRadarScanView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpfduoduo","download_url":"https://codeload.github.com/gpfduoduo/RadarScanView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225825266,"owners_count":17529905,"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":[],"created_at":"2024-08-04T19:00:48.827Z","updated_at":"2024-11-22T00:30:20.699Z","avatar_url":"https://github.com/gpfduoduo.png","language":"Java","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# RadarScanView\n自定义View之雷达扫描\n\n\n\n## 原理\n关键是使用SweepGradient进行扫描渲染\n关键代码如下：\n\n```JAVA\n        Shader shader = new SweepGradient(centerX, centerY, Color.TRANSPARENT, tailColor);\n        mPaintRadar.setShader(shader);\n```\n然后旋转起来即可\n\n```JAVA\n        matrix.postRotate(start, centerX, centerY);\n```\n       \n代码中包含了如何自定义一个View，怎样重写onMeasure、onSizeChanged、onDraw函数、自定义属性等等知识点\n\n## 效果图\n\n![image](https://github.com/gpfduoduo/RadarScanView/blob/master/RadarScanView/gif/radar.gif \"效果图\")\n\n## 添加动态显示效果 \n\n```JAVA\n  new Handler().postDelayed(new Runnable()\n        {\n            @Override\n            public void run()\n            {\n                randomTextView.addKeyWord(\"彭丽媛\");\n                randomTextView.addKeyWord(\"习近平\");\n                randomTextView.show();\n            }\n        }, 2 * 1000);\n```\n\n## 添加动态发现水波效果\n![image](https://github.com/gpfduoduo/RadarScanView/blob/master/RadarScanView/gif/radarscan.gif \"效果图\")\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpfduoduo%2FRadarScanView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpfduoduo%2FRadarScanView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpfduoduo%2FRadarScanView/lists"}