{"id":13645589,"url":"https://github.com/AlexLiuSheng/FloatView","last_synced_at":"2025-04-21T14:31:48.864Z","repository":{"id":217102677,"uuid":"59639112","full_name":"AlexLiuSheng/FloatView","owner":"AlexLiuSheng","description":"floatview on windowmanager,and you can be easy to add call show by using it","archived":false,"fork":false,"pushed_at":"2017-07-07T08:06:09.000Z","size":4687,"stargazers_count":242,"open_issues_count":2,"forks_count":49,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-02T01:25:32.552Z","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/AlexLiuSheng.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}},"created_at":"2016-05-25T07:03:22.000Z","updated_at":"2024-04-18T08:22:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"23abed32-a0b6-4236-9fc9-e1c04f6685a5","html_url":"https://github.com/AlexLiuSheng/FloatView","commit_stats":null,"previous_names":["alexliusheng/floatview"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLiuSheng%2FFloatView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLiuSheng%2FFloatView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLiuSheng%2FFloatView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLiuSheng%2FFloatView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexLiuSheng","download_url":"https://codeload.github.com/AlexLiuSheng/FloatView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223868388,"owners_count":17217079,"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-02T01:02:37.984Z","updated_at":"2024-11-09T18:31:50.969Z","avatar_url":"https://github.com/AlexLiuSheng.png","language":"Java","funding_links":[],"categories":["其他"],"sub_categories":[],"readme":"# FloatView\nfloatview on windowmanager,and you can be easy to add call show by using it\n\n自定义floatview，无需申明悬浮框权限，利用WindowManager TYPE_TOAST实现全站浮动式按钮,重写touch事件实现任意拖动，将view加入windowmanager层，可以使用控件实现类似来电秀的效果。\n  \n ## MIUI使用TYPE_TOAST也会无效，所以MIUI系统中需要在manifest里面注册SYSTEM_ALERT_Winow权限,其他系统可以不用.\n  \n  \u003cimg src=https://github.com/AlexLiuSheng/FloatView/blob/master/floatview.gif width=300/\u003e\u003cimg src=https://github.com/AlexLiuSheng/FloatView/blob/master/z.gif width=300/\u003e\u003cimg src=https://github.com/AlexLiuSheng/FloatView/blob/master/z3.gif width=300/\u003e\n \n  \n ### 导入: \n      \n`compile 'com.allenliu:floatview:1.0.1'`\n            \n ### 初始化Floatview:\n  \n             FloatView(Context context, int x, int y, View childView)\n      or\n             FloatView(Context context, int x, int y, int layoutres)\n ### 其他方法:\n  \n```\nupdateFloatViewPosition(int x, int y)//更新位置\n\nsetFloatViewClickListener(IFloatViewClick listener)`\n\naddToWindow()//加入窗口\n\nsetIsAllowTouch(boolean flag)//是否允许拖动\n\nremoveFromWindow()//移除窗口\n```\n\n\n  由于控件显示在windowmanager上，所以控件显示的生命周期需要自己手动管理,可以在Application或者基层Activity里控制显示和隐藏。\n  \n  ### 来电秀\n  利用控件也可以显示在来电秀上。\n  \n  由于继承自linearlayout所以可以添加子view，可以初始化时将View或layout传入，也可以手动addview，在监听来电时加入view即可,有兴趣的朋友可以  \n  参考下源码\n  \n          case TelephonyManager.CALL_STATE_RINGING:\n           if (!viewIsShow) {\n          viewIsShow = true;\n          if (floatView == null)\n          floatView = new FloatView(context, 0, 0, R.layout.callshow_layout);\n          floatView.addToWindow();\n          }\n   \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexLiuSheng%2FFloatView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexLiuSheng%2FFloatView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexLiuSheng%2FFloatView/lists"}