{"id":13644973,"url":"https://github.com/MasayukiSuda/BubbleLayout","last_synced_at":"2025-04-21T11:32:16.139Z","repository":{"id":54484686,"uuid":"58307937","full_name":"MasayukiSuda/BubbleLayout","owner":"MasayukiSuda","description":"Bubble View for Android.","archived":false,"fork":false,"pushed_at":"2021-07-08T15:00:46.000Z","size":258,"stargazers_count":973,"open_issues_count":9,"forks_count":135,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-11-09T17:42:46.004Z","etag":null,"topics":["android","bubblelayout"],"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/MasayukiSuda.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":"2016-05-08T10:56:12.000Z","updated_at":"2024-09-27T17:32:12.000Z","dependencies_parsed_at":"2022-08-13T17:20:49.423Z","dependency_job_id":null,"html_url":"https://github.com/MasayukiSuda/BubbleLayout","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasayukiSuda%2FBubbleLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasayukiSuda%2FBubbleLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasayukiSuda%2FBubbleLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasayukiSuda%2FBubbleLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MasayukiSuda","download_url":"https://codeload.github.com/MasayukiSuda/BubbleLayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250047977,"owners_count":21366151,"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","bubblelayout"],"created_at":"2024-08-02T01:02:22.483Z","updated_at":"2025-04-21T11:32:16.124Z","avatar_url":"https://github.com/MasayukiSuda.png","language":"Java","funding_links":[],"categories":["Popup","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# BubbleLayout\n[![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html)\n\u003cimg src=\"https://img.shields.io/badge/license-MIT-green.svg?style=flat\"\u003e\n[![API](https://img.shields.io/badge/API-14%2B-yellow.svg?style=flat)](https://android-arsenal.com/api?level=14)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-BubbleLayout-green.svg?style=true)](https://android-arsenal.com/details/1/3564)\n\nBubble View for Android with custom stroke width and color, arrow size, position and direction.\u003cbr\u003e\nBubbleLayout Extends the FrameLayout.\n\n\u003cimg src=\"art/all.gif\" width=\"40%\"/\u003e\n\n# Gradle\nStep 1. Add the JitPack repository to your build file\n```groovy\nallprojects {\n\trepositories {\n\t\t...\n\t\tmaven { url 'https://jitpack.io' }\n\t}\n}\n```\nStep 2. Add the dependency\n```groovy\ndependencies {\n        implementation 'com.github.MasayukiSuda:BubbleLayout:v1.2.2'\n}\n```\n\n\n\n# Basic Usage\n\u003cimg src=\"art/sample3.png\" width=\"20%\"/\u003e\nInclude the BubbleLayout widget in your layout.\n\n```xml\n\u003ccom.daasuu.bl.BubbleLayout\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:layout_marginTop=\"12dp\"\n    android:padding=\"8dp\"\n    app:bl_arrowDirection=\"right\"\n    app:bl_arrowHeight=\"8dp\"\n    app:bl_arrowPosition=\"16dp\"\n    app:bl_arrowWidth=\"8dp\"\n    app:bl_cornersRadius=\"6dp\"\n    app:bl_strokeWidth=\"1dp\"\u003e\n\n    \u003cTextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\n        android:layout_marginRight=\"4dp\"\n        android:text=\"BubbleLayout\"\n        android:textColor=\"@android:color/holo_red_dark\" /\u003e\n\n\u003c/com.daasuu.bl.BubbleLayout\u003e\n```\n# Attributes\nThere are several attributes you can set:\n\n| attr | description |\n|:---|:---|\n| bl_arrowWidth | Width of the arrow, default 8dp |\n| bl_arrowHeight | Height of the arrow, default 8dp |\n| bl_arrowPosition | Position of the arrow, default 12dp |\n| bl_cornersRadius | Corner radius of the BubbleLayout, default 0dp |\n| bl_bubbleColor | Color of the BubbleLayout, default WHITE |\n| bl_strokeWidth | Width of the stroke, default 0dp |\n| bl_strokeColor | Color of the stroke, default GLAY |\n| bl_arrowDirection | Drawing position of the arrow : 'left' or 'top' or 'right' or 'bottom' or 'left_center' or 'top_center' or 'right_center' or 'bottom_center' default 'left' |\n\n\n\n\n\n# Samples\n\n\u003cimg src=\"art/sample2.png\" width=\"20%\"/\u003e\n\n```xml\n\u003ccom.daasuu.bl.BubbleLayout\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:layout_marginTop=\"12dp\"\n    android:padding=\"8dp\"\n    app:bl_arrowDirection=\"top\"\n    app:bl_arrowHeight=\"8dp\"\n    app:bl_arrowPosition=\"12dp\"\n    app:bl_arrowWidth=\"8dp\"\n    app:bl_bubbleColor=\"@android:color/holo_blue_light\"\n    app:bl_cornersRadius=\"8dp\"\u003e\n\n    \u003cLinearLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\"\u003e\n\n        \u003cImageView\n            android:layout_width=\"20dp\"\n            android:layout_height=\"20dp\"\n            android:src=\"@mipmap/ic_launcher\" /\u003e\n\n        \u003cTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical\"\n            android:layout_marginLeft=\"4dp\"\n            android:text=\"BubbleLayout\"\n            android:textColor=\"@android:color/holo_red_dark\" /\u003e\n\n    \u003c/LinearLayout\u003e\n\n\u003c/com.daasuu.bl.BubbleLayout\u003e\n```\n\n\u003cimg src=\"art/sample1.png\" width=\"20%\"/\u003e\n\n```xml\n\u003ccom.daasuu.bl.BubbleLayout\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"8dp\"\n    app:bl_arrowDirection=\"left\"\n    app:bl_arrowHeight=\"8dp\"\n    app:bl_arrowPosition=\"16dp\"\n    app:bl_arrowWidth=\"8dp\"\n    app:bl_strokeWidth=\"1dp\"\u003e\n\n    \u003cTextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\n        android:layout_marginRight=\"4dp\"\n        android:text=\"BubbleLayout\"\n        android:textColor=\"@android:color/holo_red_dark\" /\u003e\n\u003c/com.daasuu.bl.BubbleLayout\u003e\n```\n\n\u003cimg src=\"art/popup.gif\" width=\"30%\"/\u003e\n\n```java\nButton button = (Button) findViewById(R.id.btn_popup);\n\nBubbleLayout bubbleLayout = (BubbleLayout) LayoutInflater.from(this).inflate(R.layout.layout_sample_popup, null);\nPopupWindow popupWindow = BubblePopupHelper.create(this, bubbleLayout);\nfinal Random random = new Random();\n\nbutton.setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View v) {\n        int[] location = new int[2];\n        v.getLocationInWindow(location);\n        if (random.nextBoolean()) {\n            bubbleLayout.setArrowDirection(ArrowDirection.TOP);\n        } else {\n            bubbleLayout.setArrowDirection(ArrowDirection.BOTTOM);\n        }\n        popupWindow.showAtLocation(v, Gravity.NO_GRAVITY, location[0], v.getHeight() + location[1]);\n    }\n});\n```\nlayout_sample_popup.xml\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003ccom.daasuu.bl.BubbleLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"@dimen/activity_horizontal_margin\"\n    app:bl_arrowDirection=\"top\"\n    app:bl_arrowHeight=\"12dp\"\n    app:bl_arrowPosition=\"16dp\"\n    app:bl_arrowWidth=\"8dp\"\n    app:bl_bubbleColor=\"@color/colorAccent\"\n    app:bl_cornersRadius=\"2dp\"\u003e\n\n    \u003cTextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center_vertical\"\n        android:layout_marginRight=\"4dp\"\n        android:text=\"BubbleLayout Popup\"\n        android:textColor=\"@android:color/white\" /\u003e\n\u003c/com.daasuu.bl.BubbleLayout\u003e\n```\n# License\n\nCopyright 2016 MasayukiSuda\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMasayukiSuda%2FBubbleLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMasayukiSuda%2FBubbleLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMasayukiSuda%2FBubbleLayout/lists"}