{"id":13642031,"url":"https://github.com/Cleveroad/CycleMenu","last_synced_at":"2025-04-20T12:31:24.718Z","repository":{"id":57718259,"uuid":"77131190","full_name":"Cleveroad/CycleMenu","owner":"Cleveroad","description":"Custom LayoutManager for the inner RecyclerView","archived":false,"fork":false,"pushed_at":"2019-01-02T08:30:50.000Z","size":2197,"stargazers_count":572,"open_issues_count":3,"forks_count":102,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-05T07:06:40.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.cleveroad.com","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/Cleveroad.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":"2016-12-22T09:24:25.000Z","updated_at":"2025-01-31T10:38:40.000Z","dependencies_parsed_at":"2022-08-24T07:11:11.265Z","dependency_job_id":null,"html_url":"https://github.com/Cleveroad/CycleMenu","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/Cleveroad%2FCycleMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2FCycleMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2FCycleMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2FCycleMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cleveroad","download_url":"https://codeload.github.com/Cleveroad/CycleMenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249893411,"owners_count":21341444,"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:01:26.658Z","updated_at":"2025-04-20T12:31:19.699Z","avatar_url":"https://github.com/Cleveroad.png","language":"Java","readme":"# CycleMenu [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) \u003cimg src=\"https://www.cleveroad.com/public/comercial/label-android.svg\" height=\"20\"\u003e \u003ca href=\"https://www.cleveroad.com/?utm_source=github\u0026utm_medium=label\u0026utm_campaign=contacts\"\u003e\u003cimg src=\"https://www.cleveroad.com/public/comercial/label-cleveroad.svg\" height=\"20\"\u003e\u003c/a\u003e\n![Header image](/images/header.jpg)\n\n## Meet CycleMenu for Android by Cleveroad\n\nWhat can be better than an eye-catching design in couple with reasonable features? While using this menu you do not need to worry about the lack of space for some useful features since the scroll type can be endless as well as basic. Choose an appropriate corner, customize your icons and here you go!\n\n![Demo image](/images/demo.gif)\n\n\nDuring its development, we have created a custom LayoutManager for the inner RecyclerView in order to display the elements in a circle with the possibility to scroll them.\n\nIn case you are in need of beautiful and functional app menu, you are welcome to use CycleMenu. Make your scroll last forever!\n\n[![Awesome](/images/logo-footer.png)](https://www.cleveroad.com/?utm_source=github\u0026utm_medium=label\u0026utm_campaign=contacts)\n\n## Setup and usage\nTo include this library to your project add dependency in **build.gradle** file:\n```groovy\n    dependencies {\n        implementation 'com.cleveroad:cycle-menu:1.0.2'\n    }\n```\n\nUse the CycleMenu in layout file\n```XML\n\u003ccom.cleveroad.sy.cyclemenuwidget.CycleMenuWidget\n        android:id=\"@+id/itemCycleMenuWidget\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n\n        app:cm_autoMaxRadius=\"220dp\"\n        app:cm_autoMinRadius=\"10dp\"\n        app:cm_corner=\"right_top\"\n        app:cm_fixedRadius=\"200dp\"\n        app:cm_radius_scale_type=\"auto\"\n        app:cm_scroll_type=\"endless\"\n        app:cm_item_background_tint=\"#449955\"\n        app:cm_corner_image_src=\"@drawable/ic_corner_image\"\n        app:cm_ripple_color=\"#009933\"\n        /\u003e\n/\u003e\n```\nor programmatically\n```JAVA\nCycleMenuWidget cycleMenuWidget = new CycleMenuWidget(mContext);\ncycleMenuWidget.setLayoutParams(new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));\ncontainer.addView(cycleMenuWidget);\n```\nTo set menu resources from xml resource or Collection use:\n```JAVA\ncycleMenuWidget.setMenuRes(R.menu.menu_items);\ncycleMenuWidget.setMenuItems(Collection\u003cCycleMenuItem\u003e items);\n```\n\nYou can setup any attribute from xml via method.\nMethods for setting radius scaling type:\n```JAVA\nvoid setScalingType(RADIUS_SCALING_TYPE scalingType)\nvoid setAutoMinRadius(int autoMinRadius)\nvoid setAutoMaxRadius(int autoMaxRadius)\nvoid setFixedRadius(int fixedRadius)\n\n```\nIf you choose to use `RADIUS_SCALING_TYPE.AUTO` then you need to setup autoMinRadius and autoMaxRadius. This values will be use to calculate radius of menu.\nIf menu has small amount of items - the radius will be calculated to fit all items but not less then autoMinRadius. If there is a lot of items in the menu then radius will be equal autoMaxRadius.\nif you setup autoMaxRadius bigger then available space for the menu - radius will be reduced.\nIf you choose to use RADIUS_SCALING_TYPE.FIXED the the menu radius will be equal to fixedRadius. But not bigger then available space for the menu.\n\nTo setup scroll type. The scroll type can be `ENDLESS` (infinite scrolling) ans `BASIC` (general scrolling).\n```JAVA\nvoid setScrollType(SCROLL scrollType)\n```\n\nTo setup corner in which will be placed menu use:\n```JAVA\nvoid setCorner(CORNER corner)\n```\nAnd methods to setup UI:\n```JAVA\nvoid setItemsBackgroundTint(ColorStateList itemsBackgroundTint)\nvoid setRippleColor(int rippleColor)\nvoid setCornerImageDrawable(Drawable cornerImageDrawable)\nvoid setCornerImageResource(@DrawableRes int drawableRes)\nvoid setCornerImageBitmap(Bitmap bitmap)\nvoid setCollapsedRadius(int collapsedRadius)\nvoid setBackground(int backgroundColor)\n```\n\nFor listening changing menu state use\n```JAVA\nsetStateChangeListener(\n    new OnStateChangedListener() {\n        void onStateChanged(CycleMenuWidget.STATE state){};\n        void onOpen(){};\n        void onClose(){};\n})\n```\nFor listening menu items clicks use\n```JAVA\nsetOnMenuItemClickListener(\n    new OnMenuItemClickListener() {\n        void onMenuItemClick(View view, int itemPosition) {}\n})\n```\n\nFor providing saving state listener use\n```JAVA\nsetStateSaveListener(\n    new StateSaveListener() {\n        void saveState(int itemPosition, double lastItemAngleShift){}\n});\n```\n\n## Changelog\nSee [changelog history].\n\n## Support\n\nIf you have any questions, issues or propositions, please create a \u003ca href=\"../../issues/new\"\u003enew issue\u003c/a\u003e in this repository.\n\nIf you want to hire us, send an email to sales@cleveroad.com or fill the form on \u003ca href=\"https://www.cleveroad.com/contact\"\u003econtact page\u003c/a\u003e\n\nFollow us:\n\n[![Awesome](/images/social/facebook.png)](https://www.facebook.com/cleveroadinc/)   [![Awesome](/images/social/twitter.png)](https://twitter.com/cleveroadinc)   [![Awesome](/images/social/google.png)](https://plus.google.com/+CleveroadInc)   [![Awesome](/images/social/linkedin.png)](https://www.linkedin.com/company/cleveroad-inc-)   [![Awesome](/images/social/youtube.png)](https://www.youtube.com/channel/UCFNHnq1sEtLiy0YCRHG2Vaw)\n\u003cbr/\u003e\n\n\n## License\n* * *\n    The MIT License (MIT)\n\n    Copyright (c) 2016 Cleveroad Inc.\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.\n\n[changelog history]: /CHANGELOG.md\n","funding_links":[],"categories":["菜单(Menu)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCleveroad%2FCycleMenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCleveroad%2FCycleMenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCleveroad%2FCycleMenu/lists"}