{"id":21038506,"url":"https://github.com/tuenti/buttonmenu","last_synced_at":"2025-03-29T16:03:04.708Z","repository":{"id":19115874,"uuid":"22344826","full_name":"tuenti/ButtonMenu","owner":"tuenti","description":"ButtonMenu is an Android library created to build user interfaces based on buttons. This library has been implemented  using Model View ViewModel pattern combined with an Android custom view that extends LinearLayout.","archived":false,"fork":false,"pushed_at":"2020-07-13T17:50:25.000Z","size":20544,"stargazers_count":439,"open_issues_count":1,"forks_count":82,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-03-21T17:21:35.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tuenti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-28T14:13:16.000Z","updated_at":"2024-11-13T10:19:49.000Z","dependencies_parsed_at":"2022-09-10T23:41:38.335Z","dependency_job_id":null,"html_url":"https://github.com/tuenti/ButtonMenu","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/tuenti%2FButtonMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuenti%2FButtonMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuenti%2FButtonMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuenti%2FButtonMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuenti","download_url":"https://codeload.github.com/tuenti/ButtonMenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246207492,"owners_count":20740723,"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-19T13:32:46.731Z","updated_at":"2025-03-29T16:03:04.681Z","avatar_url":"https://github.com/tuenti.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Button Menu [![Build Status](https://travis-ci.org/tuenti/ButtonMenu.svg?branch=master)](https://travis-ci.org/tuenti/ButtonMenu) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.tuenti.buttonmenu/library/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.tuenti.buttonmenu/library) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Button%20Menu-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/887)\n===========\n\nButtonMenu is an Android library created to build user interfaces based on buttons. This library has been implemented\n using Model View ViewModel pattern combined with an Android custom view that extends LinearLayout.\n\nIn this library you will find a custom view implementation called ButtonMenu and a custom animator called\nScrollAnimator you can use to link the scroll of a ListView with your ButtonMenu to show or hide the view when the\nuser uses the ListView scroll.\n\nThis library works on Android 2.X or higher versions.\n\nScreenshots\n-----------\n\n![Demo Screenshot 1][1]\n![Demo Screenshot 2][2]\n\nDownload\n--------\n\nDownload the project, compile it using ``mvn clean install`` import ``buttonmenu-1.0.9.jar`` into your project.\n\nOr declare it into your pom.xml\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.tuenti.buttonmenu\u003c/groupId\u003e\n    \u003cartifactId\u003elibrary\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.9\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\nOr into your build.gradle\n```groovy\ndependencies{\n    compile 'com.tuenti.buttonmenu:library:1.0.9'\n}\n```\n\n\nUsage\n-----\n\n* 1. Add a ``ButtonMenu`` to your layout.\n\n```xml\n\u003ccom.tuenti.buttonmenu.ButtonMenu\n\t\tandroid:id=\"@+id/button_menu\"\n\t\tstyle=\"@style/button_menu\"/\u003e\n```\n\n* 2. Initialize your ButtonMenu widget with a ButtonMenuVM implementation inside your Activity or Fragment. You can use\nour SimpleButtonMenuVM implementation or create your own ButtonMenuVM implementation.\n\n```java\nprivate void initializeButtonMenu() {\n\tbutton_menu = (ButtonMenu) findViewById(R.id.button_menu);\n\tbutton_menu.setButtonMenuVM(buttonMenuVM);\n\tbutton_menu.initialize();\n}\n```\n\n* 3. If you want to create your custom ButtonMenuVM implementation you can follow the sample implemented in\nCustomButtonMenuVM.\n\n```java\npublic class CustomButtonMenuVM extends SimpleButtonMenuVM {\n\n/*\n * Every ButtonVM implementation could be moved to a different file extending SimpleButtonVM if needed.\n */\nprivate final ButtonVM moment = new SimpleButtonVM(R.layout.moment_button, R.id.moment, null);\nprivate final ButtonVM photo = new SimpleButtonVM(R.layout.photo_button, R.id.photo, null);\nprivate final ButtonVM contact = new SimpleButtonVM(R.layout.contact_button, R.id.contact, null);\n\npublic CustomButtonMenuVM() {\n\tsuper();\n\taddItem(moment);\n\taddItem(photo);\n\taddItem(contact);\n}\n```\n\n* 4. Connect your ButtonMenu widget with the ScrollAnimator to attach the scroll animation effect.\n\n```java\nprivate void initializeScrollAnimator() {\n\tScrollAnimator scrollAnimator = new ScrollAnimator(button_menu, new ObjectAnimatorFactory());\n\tscrollAnimator.configureListView(lv_contacts);\n\tscrollAnimator.setDurationInMillis(300);\n}\n```\n\nReview different ButtonVM implementations -like ``SimpleButtonVM`` or ``ButtonWithMutableSubjectVM`` - in this\nproject if you want to create your custom ButtonVM.\n\nCredits \u0026 Contact\n-----------------\n\nButtonMenu was created by [Android team at Tuenti Technologies S.L.](http://github.com/tuenti). You can follow Tuenti\nengineering team on Twitter [@tuentieng](http://twitter.com/tuentieng).\n\nLicense\n-------\n\nButtonMenu is available under the Apache License, Version 2.0. See LICENSE.txt file for more info.\n\n[1]: ./art/screenshot1.gif\n[2]: ./art/screenshot2.gif\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuenti%2Fbuttonmenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuenti%2Fbuttonmenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuenti%2Fbuttonmenu/lists"}