{"id":13790439,"url":"https://github.com/Chrisvin/RubberPicker","last_synced_at":"2025-05-12T09:32:43.815Z","repository":{"id":43512580,"uuid":"206973245","full_name":"Chrisvin/RubberPicker","owner":"Chrisvin","description":"Android Rubber Picker Library","archived":false,"fork":false,"pushed_at":"2022-02-04T09:03:12.000Z","size":3980,"stargazers_count":567,"open_issues_count":1,"forks_count":40,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-26T06:53:56.343Z","etag":null,"topics":["android","android-library","library","rangepicker","rubber","rubberrangepicker","rubberseekbar","seekbar"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chrisvin.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}},"created_at":"2019-09-07T13:37:55.000Z","updated_at":"2024-12-25T02:01:34.000Z","dependencies_parsed_at":"2022-08-28T20:11:22.987Z","dependency_job_id":null,"html_url":"https://github.com/Chrisvin/RubberPicker","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/Chrisvin%2FRubberPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chrisvin%2FRubberPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chrisvin%2FRubberPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chrisvin%2FRubberPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chrisvin","download_url":"https://codeload.github.com/Chrisvin/RubberPicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253709301,"owners_count":21951123,"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","android-library","library","rangepicker","rubber","rubberrangepicker","rubberseekbar","seekbar"],"created_at":"2024-08-03T22:00:43.813Z","updated_at":"2025-05-12T09:32:39.338Z","avatar_url":"https://github.com/Chrisvin.png","language":"Kotlin","funding_links":[],"categories":["Index"],"sub_categories":[],"readme":"# RubberPicker\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-silver.svg)](https://opensource.org/licenses/MIT) [![](https://jitpack.io/v/Chrisvin/RubberPicker.svg)](https://jitpack.io/#Chrisvin/RubberPicker) [![API](https://img.shields.io/badge/API-15%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=15) [![Android Arsenal]( https://img.shields.io/badge/Android%20Arsenal-RubberPicker-gold.svg?style=flat )]( https://android-arsenal.com/details/1/7867 )\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"RubberPicker-Demo.gif\"/\u003e\u003c/p\u003e\n\nRubberPicker library contains the `RubberSeekBar` and `RubberRangePicker`, inspired by [Cuberto's rubber-range-picker](https://github.com/Cuberto/rubber-range-picker).\n\n## Getting started\n### Setting up the dependency\n1. Add the JitPack repository to your root build.gradle at the end of repositories:\n```\nallprojects {\n\trepositories {\n\t\t...\n\t\tmaven { url 'https://jitpack.io' }\n\t}\n}\n```\n2. Add the RubberPicker dependency in the build.gradle:\n```\nimplementation 'com.github.Chrisvin:RubberPicker:v1.5'\n```\n\n### Demo app\nTo run the demo project, clone the repository and run it via Android Studio.\n\n## Usage\n### Adding directly in layout.xml\n```\n\u003ccom.jem.rubberpicker.RubberSeekBar\n  ...\n  app:minValue=\"20\"\n  app:maxValue=\"80\"\n  app:elasticBehavior=\"cubic\"\n  app:dampingRatio=\"0.3\"\n  app:stiffness=\"300\"\n  app:stretchRange=\"24dp\"\n  app:defaultThumbRadius=\"16dp\"\n  app:normalTrackWidth=\"4dp\"\n  app:highlightTrackWidth=\"8dp\"\n  app:normalTrackColor=\"#AAAAAA\"\n  app:highlightTrackColor=\"#BA1F33\"\n  app:defaultThumbInsideColor=\"#FFF\"\n  app:highlightDefaultThumbOnTouchColor=\"#CD5D67\"/\u003e\n\n\u003c!-- Similar attributes can be applied for RubberRangePicker as well--\u003e\n\u003ccom.jem.rubberpicker.RubberRangePicker\n  ...\n  app:minValue=\"0\"\n  app:maxValue=\"100\"\n  app:elasticBehavior=\"linear\"\n  app:dampingRatio=\"0.4\"\n  app:stiffness=\"400\"\n  app:stretchRange=\"36dp\"\n  app:defaultThumbRadius=\"16dp\"\n  app:normalTrackWidth=\"4dp\"\n  app:highlightTrackWidth=\"8dp\"\n  app:normalTrackColor=\"#AAAAAA\"\n  app:highlightTrackColor=\"#BA1F33\"\n  app:defaultThumbInsideColor=\"#CFCD5D67\"\n  app:highlightDefaultThumbOnTouchColor=\"#CD5D67\"/\u003e\n```\n### Adding/Modifying programmatically\n```kotlin\nval rubberSeekBar = RubberSeekBar(this)\nrubberSeekBar.setMin(20)\nrubberSeekBar.setMax(80)\nrubberSeekBar.setElasticBehavior(ElasticBehavior.CUBIC)\nrubberSeekBar.setDampingRatio(0.4F)\nrubberSeekBar.setStiffness(1000F)\nrubberSeekBar.setStretchRange(50f)\nrubberSeekBar.setThumbRadius(32f)\nrubberSeekBar.setNormalTrackWidth(2f)\nrubberSeekBar.setHighlightTrackWidth(4f)\nrubberSeekBar.setNormalTrackColor(Color.GRAY)\nrubberSeekBar.setHighlightTrackColor(Color.BLUE)\nrubberSeekBar.setHighlightThumbOnTouchColor(Color.CYAN)\nrubberSeekBar.setDefaultThumbInsideColor(Color.WHITE)\n\nval currentValue = rubberSeekBar.getCurrentValue()\nrubberSeekBar.setCurrentValue(currentValue + 10)\nrubberSeekBar.setOnRubberSeekBarChangeListener(object : RubberSeekBar.OnRubberSeekBarChangeListener {\n    override fun onProgressChanged(seekBar: RubberSeekBar, value: Int, fromUser: Boolean) {}\n    override fun onStartTrackingTouch(seekBar: RubberSeekBar) {}\n    override fun onStopTrackingTouch(seekBar: RubberSeekBar) {}\n})\n\n\n//Similarly for RubberRangePicker\nval rubberRangePicker = RubberRangePicker(this)\nrubberRangePicker.setMin(20)\n...\nrubberRangePicker.setHighlightThumbOnTouchColor(Color.CYAN)\n\nval startThumbValue = rubberRangePicker.getCurrentStartValue()\nrubberRangePicker.setCurrentStartValue(startThumbValue + 10)\nval endThumbValue = rubberRangePicker.getCurrentEndValue()\nrubberRangePicker.setCurrentEndValue(endThumbValue + 10)\nrubberRangePicker.setOnRubberRangePickerChangeListener(object: RubberRangePicker.OnRubberRangePickerChangeListener{\n    override fun onProgressChanged(rangePicker: RubberRangePicker, startValue: Int, endValue: Int, fromUser: Boolean) {}\n    override fun onStartTrackingTouch(rangePicker: RubberRangePicker, isStartThumb: Boolean) {}\n    override fun onStopTrackingTouch(rangePicker: RubberRangePicker, isStartThumb: Boolean) {}\n})\n```\n\n## Todo\n- [ ] Refactor code to remove redundant code between RubberSeekBar \u0026 RubberRangePicker.\n- [ ] Add step attribute, make necessary UI adjustments for step based value increments.\n- [ ] Current library overcomes view clipping by setting the parent layout's clipChildren \u0026 clipToPadding as false. Find a better alternative to overcome view clipping.\n\n## Bugs and Feedback\nFor bugs, questions and discussions please use the [Github Issues](https://github.com/Chrisvin/RubberPicker/issues).\n\n## License\n```\nMIT License\n\nCopyright (c) 2019 Jem\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChrisvin%2FRubberPicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChrisvin%2FRubberPicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChrisvin%2FRubberPicker/lists"}