{"id":18270161,"url":"https://github.com/shehabic/Droppy","last_synced_at":"2025-04-04T23:31:47.269Z","repository":{"id":27980472,"uuid":"31473950","full_name":"shehabic/Droppy","owner":"shehabic","description":"A simple yet-powerful and fully customizable Android drop-down menu. It supports Text with/without Icons, Separators, and even fully customized views.","archived":false,"fork":false,"pushed_at":"2020-12-06T21:48:01.000Z","size":1487,"stargazers_count":655,"open_issues_count":23,"forks_count":93,"subscribers_count":37,"default_branch":"master","last_synced_at":"2024-11-05T11:52:23.671Z","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/shehabic.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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-02-28T19:37:28.000Z","updated_at":"2024-06-23T23:08:24.000Z","dependencies_parsed_at":"2022-08-26T11:20:45.145Z","dependency_job_id":null,"html_url":"https://github.com/shehabic/Droppy","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shehabic%2FDroppy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shehabic%2FDroppy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shehabic%2FDroppy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shehabic%2FDroppy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shehabic","download_url":"https://codeload.github.com/shehabic/Droppy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266476,"owners_count":20910831,"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-11-05T11:38:21.388Z","updated_at":"2025-04-04T23:31:45.670Z","avatar_url":"https://github.com/shehabic.png","language":"Java","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"### Not currently under maintenance\nI'm afraid I don't have enough time at the moment to maintain the lib, if anyone would like to participate in modernizing it you're more than welcome :)\n\n---\n\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Droppy-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/1648)\n\nDroppy\n======\n\nA simple yet-customizable Android drop-down menu. It supports Text with/without Icons, Separators, and even fully customized views.\n\nVersion\n=======\nv.0.6.0\n\nUsage (Maven)\n=============\n```XML\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.shehabic.droppy\u003c/groupId\u003e\n    \u003cartifactId\u003eDroppy\u003c/artifactId\u003e\n    \u003cversion\u003e0.6.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nUsage (Gradle)\n==============\n```groovy\ncompile 'com.shehabic.droppy:Droppy:0.6.0@aar'\n```\n\nGenerate Programmatically\n=========================\n\n```JAVA\n// Assume we have a button in our Layout as follows\nButtton anchor = (Button) findViewById(R.id.button1);\n\nDroppyMenuPopup.Builder droppyBuilder = new DroppyMenuPopup.Builder(MyActivity.this, anchor);\n\n// Add normal items (text only)\ndroppyBuilder.addMenuItem(new DroppyMenuItem(\"test1\"))\n    .addMenuItem(new DroppyMenuItem(\"test2\"))\n    .addSeparator();\n\n// Add Item with icon\ndroppyBuilder.addMenuItem(new DroppyMenuItem(\"test3\", R.drawable.ic_launcher));\n\n// Add custom views\nDroppyMenuCustomView sBarItem = new DroppyMenuCustomView(R.layout.slider);\ndroppyBuilder.addMenuItem(sBarItem);\n\n// Set Callback handler\ndroppyBuilder.setOnClick(new DroppyClickCallbackInterface() {\n    @Override\n    public void call(View v, int id) {\n        Log.d(\"Clicked on \", String.valueOf(id));\n    }\n});\n        \nDroppyMenuPopup droppyMenu = droppyBuilder.build();\n\n// Then once you click on the button it'll show\n// Alternatively you can call droppyMenu.show();\n```\n\nGenerate From Menu Resource (XML)\n=================================\ngiven: ```src/main/res/menu/droppy.xml```\n\n```XML\n\u003cmenu xmlns:android=\"http://schemas.android.com/apk/res/android\"\n      xmlns:tools=\"http://schemas.android.com/tools\"\n      tools:context=\"com.shehabic.droppy_samples.MainActivity\"\u003e\n    \u003cgroup android:enabled=\"true\"\u003e\n        \u003citem\n            android:id=\"@+id/dropp1\"\n            android:title=\"Xml Item 1\"\n            /\u003e\n\n        \u003citem\n            android:id=\"@+id/droppy2\"\n            android:title=\"Xml Item 2\"\n            /\u003e\n    \u003c/group\u003e\n    \u003cgroup android:enabled=\"true\"\u003e\n        \u003citem\n            android:id=\"@+id/dropp3\"\n            android:icon=\"@drawable/ic_launcher\"\n            android:title=\"Xml Item 3\"\n            /\u003e\n\n        \u003citem\n            android:id=\"@+id/droppy4\"\n            android:icon=\"@drawable/ic_launcher\"\n            android:title=\"Xml Item 4\"\n            /\u003e\n    \u003c/group\u003e\n\u003c/menu\u003e\n\n```\n\nWe generate the menu as follows:\n\n```JAVA\nDroppyMenuPopup droppyMenu;\nDroppyMenuPopup.Builder droppyBuilder = new DroppyMenuPopup.Builder(this, btn);\nDroppyMenuPopup droppyMenu = droppyBuilder.fromMenu(R.menu.droppy)\n    .triggerOnAnchorClick(false)\n    .setOnClick(new DroppyClickCallbackInterface() {\n        @Override\n        public void call(View v, int id) {\n            Log.d(\"Id:\", String.valueOf(id));\n        }\n    })\n    .setOnDismissCallback(DroppyMenuPopup.OnDismissCallback() {\n        @Override\n        public void call()\n        {\n            Toast.makeText(this, \"Menu dismissed\", Toast.LENGTH_SHORT).show();\n        }\n     })\n    .setPopupAnimation(new DroppyFadeInAnimation())\n    .setXOffset(5)\n    .setYOffset(5)\n    .build();\ndroppyMenu.show();\n```\n\nCustomizing Syles\n=================\n```XML\n    \u003cstyle name=\"YourAppTheme\" parent=\"Whatever.Parent.Theme.You.Are.Extending\"\u003e\n        \u003citem name=\"droppyPopupStyle\"\u003e@style/Your.Custom.DroppyPopup\u003c/item\u003e\n        \u003citem name=\"droppyMenuStyle\"\u003e@style/Your.Custom.DroppyMenu\u003c/item\u003e\n        \u003citem name=\"droppyMenuSeparator\"\u003e@style/Your.Custom.DroppyMenuSeparator\u003c/item\u003e\n        \u003citem name=\"droppyMenuItemStyle\"\u003e@style/Your.Custom.DroppyMenuItem\u003c/item\u003e\n        \u003citem name=\"droppyMenuItemTitleStyle\"\u003e@style/Your.Custom.DroppyMenuItemTitle\u003c/item\u003e\n        \u003citem name=\"droppyMenuItemIconStyle\"\u003e@style/Your.Custom.DroppyMenuItemIcon\u003c/item\u003e\n    \u003c/style\u003e\n    \n    \u003c!-- Your custom styles go here --\u003e\n    \u003cstyle name=\"Your.Custom.DroppyPopup\" parent=\"Droppy.DroppyPopup\"\u003e\n        \u003c!-- Your Custom style attributes go here --\u003e\n    \u003c/style\u003e\n    \u003cstyle name=\"Your.Custom.DroppyMenu\" parent=\"Droppy.DroppyMenu\"\u003e\n        \u003c!-- Your Custom style attributes go here --\u003e\n    \u003c/style\u003e\n    \u003cstyle name=\"Your.Custom.DroppyMenuSeparator\" parent=\"Droppy.DroppyMenuSeparator\"\u003e\n            \u003c!-- Your Custom style attributes go here --\u003e\n        \u003c/style\u003e\n    \u003cstyle name=\"Your.Custom.DroppyMenuItem\" parent=\"Droppy.DroppyMenuItem\"\u003e\n        \u003c!-- Your Custom style attributes go here --\u003e\n    \u003c/style\u003e\n    \u003cstyle name=\"Your.Custom.DroppyMenuItemTitle\" parent=\"Droppy.DroppyMenuItemTitle\"\u003e\n        \u003c!-- Your Custom style attributes go here --\u003e\n    \u003c/style\u003e\n    \u003cstyle name=\"Your.Custom.DroppyMenuItemIcon\" parent=\"Droppy.DroppyMenuItemIcon\"\u003e\n        \u003c!-- Your Custom style attributes go here --\u003e\n    \u003c/style\u003e\n```\n\nHow it looks like\n=================\n![](https://raw.githubusercontent.com/shehabic/Droppy/master/droppy-preview.gif)\n\n![](https://raw.githubusercontent.com/shehabic/Droppy/screenshots/Droppy_Screenshot.png)\n\nWhy not the native PopupMenu?\n=============================\nWell if you have struggled long enough trying to show an icon beside the text in the normal popup menu or wanted to created a simple popup with custom view yest still contextual to an exisitng view, you would've know that it was almost impossible to do with the normal popup menu unless you use reflection and hack a the internal properties for PopupMenu and yet just add extra icon but not a fully customized view.\n\nReporting Bug / Opening Issues\n==============================\n  1-Please first make sure the issue you're reporting doesn't already exists to avoid duplicates.\n  2-Please make sure you specify enough info if possible, including Target and Minimum SDK used, and portion of the code in addition to the stack trace/error message in case of errors.\n\nForks / Pull Request\n====================\n  As per the license you're free to fork the lib, and modify as you\n  Pull-request for enhancements and bug-fixes ar always welcomed\n\nDeveloped By\n============\n* Mohamed Shehab - \u003cshehabic@gmail.com\u003e\n\n\nLicense\n=======\n    Copyright 2015-2016 Mohamed Shehab\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshehabic%2FDroppy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshehabic%2FDroppy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshehabic%2FDroppy/lists"}