{"id":19510829,"url":"https://github.com/smuyyh/bubblepopupwindow","last_synced_at":"2025-04-09T16:13:07.250Z","repository":{"id":108852965,"uuid":"66528702","full_name":"smuyyh/BubblePopupWindow","owner":"smuyyh","description":"Android 实现各个方向的气泡弹窗，可控制气泡尖角偏移量。","archived":false,"fork":false,"pushed_at":"2017-10-24T09:10:09.000Z","size":132,"stargazers_count":348,"open_issues_count":2,"forks_count":70,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-09T16:13:02.098Z","etag":null,"topics":["android","bubble"],"latest_commit_sha":null,"homepage":"http://blog.csdn.net/yyh352091626/article/details/52314372","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/smuyyh.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":"2016-08-25T05:47:31.000Z","updated_at":"2025-03-25T08:09:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbaeb869-9c38-4a34-8574-4bf0bc6462e8","html_url":"https://github.com/smuyyh/BubblePopupWindow","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"8bd58835478d6cb4a0b2ec8c225939b809f67fe2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smuyyh%2FBubblePopupWindow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smuyyh%2FBubblePopupWindow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smuyyh%2FBubblePopupWindow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smuyyh%2FBubblePopupWindow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smuyyh","download_url":"https://codeload.github.com/smuyyh/BubblePopupWindow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065282,"owners_count":21041872,"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":["android","bubble"],"created_at":"2024-11-10T23:17:50.007Z","updated_at":"2025-04-09T16:13:07.219Z","avatar_url":"https://github.com/smuyyh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BubblePopupWindow\nAndroid 实现各个方向的气泡弹窗，可控制气泡尖角偏移量。\n\n### 截图\n\u003cimg src=\"https://github.com/smuyyh/BubblePopupWindow/blob/master/screenshot/screen.png?raw=true\" width=280/\u003e\n\n### 依赖\n```\ndependencies {\n    compile 'com.yuyh.bubble:library:1.0.0'\n}\n```\n\n### 使用\n- 默认弹窗\n```java\nBubblePopupWindow leftTopWindow = new BubblePopupWindow(MainActivity.this);\nView bubbleView = inflater.inflate(R.layout.layout_popup_view, null);\nTextView tvContent = (TextView) bubbleView.findViewById(R.id.tvContent);\ntvContent.setText(\"HelloWorld\");\nleftTopWindow.setBubbleView(bubbleView); // 设置气泡内容\nleftTopWindow.show(view, Gravity.BOTTOM, 0); // 显示弹窗\n```\n```java\n/**\n * 显示弹窗\n *\n * @param parent\n * @param gravity\n * @param bubbleOffset 气泡尖角位置偏移量。默认位于中间\n */\npublic void show(View parent, int gravity, float bubbleOffset) {\n    // ...\n}\n```\n- 自定义弹窗\n使用气泡布局\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003ccom.yuyh.library.BubbleRelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/brlBackground\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"@android:color/transparent\"\n    app:cornerRadius=\"10\"\n    app:halfBaseOfLeg=\"18dp\"\n    app:padding=\"18dp\"\n    app:shadowColor=\"#64000000\"\n    app:strokeWidth=\"5\"\u003e\n    \n    \u003c!-- add view  --\u003e\n\n\u003c/com.yuyh.library.BubbleRelativeLayout\u003e\n```\n然后通过PopupWindow显示气泡弹窗，当然，也可直接显示气泡布局。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmuyyh%2Fbubblepopupwindow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmuyyh%2Fbubblepopupwindow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmuyyh%2Fbubblepopupwindow/lists"}