{"id":21883049,"url":"https://github.com/siavash79/rangesliderpreference","last_synced_at":"2025-04-15T06:08:23.450Z","repository":{"id":42180416,"uuid":"509910973","full_name":"siavash79/rangesliderpreference","owner":"siavash79","description":"Android Preference based on RangeSlider","archived":false,"fork":false,"pushed_at":"2025-03-15T14:10:06.000Z","size":94,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T06:08:18.666Z","etag":null,"topics":["android","library","preference","range","slider"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siavash79.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-03T03:14:30.000Z","updated_at":"2025-03-25T16:09:39.000Z","dependencies_parsed_at":"2023-01-18T12:00:50.371Z","dependency_job_id":"73958ce1-683a-4689-91ee-8b8486f41429","html_url":"https://github.com/siavash79/rangesliderpreference","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siavash79%2Frangesliderpreference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siavash79%2Frangesliderpreference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siavash79%2Frangesliderpreference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siavash79%2Frangesliderpreference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siavash79","download_url":"https://codeload.github.com/siavash79/rangesliderpreference/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016627,"owners_count":21198833,"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","library","preference","range","slider"],"created_at":"2024-11-28T09:38:55.315Z","updated_at":"2025-04-15T06:08:23.421Z","avatar_url":"https://github.com/siavash79.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Range Slider Preference\n\nThis is a simple (yet very useful) library, based on \u003cins\u003ecom.google.android.material.slider.RangeSlider\u003c/ins\u003e widget, to be used as Preference in Android's PreferenceScreen pages.\n\n**The problem:**  \nAndroid's built-in SeekBarPreference can only include a single slider, thus can show/set only one value per preference. However, if you need to set ranges in preferences, there's no built-in Slider Preference available.\n\n**Range Slider Preference** is able to show/set several values per preference, covering SeekBarPreference's shortcoming.\n\n**How to include**  \nYou can clone this repository using git, or simply add it to your project as a submodule (git submodule add https://github.com/siavash79/rangesliderpreference.git)\n\nTo use this preference in your apps, simply add this repository to your project as a module, and add the module to your app's dependencies.\n\nYou can then add it as a preference to your app settings page:\n\n    \u003cPreferenceScreen xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\u003e\n    .\n    .\n    \u003csh.siava.rangesliderpreference.RangeSliderPreference\n      android:key=\"MY_KEY\"\n      android:title=\"@string/the_title\"\n      android:summary=\"@string/the_summary\"\n      app:tickInterval=\".5\"        //value intervals\n      app:valueCount=\"3\"           //How many values shall be set - can be even 1\n      app:minVal=\"0\"\t       //Slider start point\n      app:maxVal=\"60\"              //Slider end point\n      app:defaultValue=\"3,12,46.5\" //Default values, comma separated \n    /\u003e\n    .\n    .\n    \u003c/PreferenceScreen\u003e\nIn the above example, you are setting a slider that operates 3 values that must be between 0 to 60, increase every 0.5 unit, and if the preference is not yet set, defaults to 3, 12 and 46.5.\n\nRangeSliderPreference is also able to parse the values of your previously-set preference, if it's of any of types Integer, Float, or JSON string (Name/value, or name/array)\n\nto read the preference values in your app, simply use the static method included:\n\n    List\u003cFloat\u003e values = RangeSliderPreference.getValues(\n                            myPrefrences        /*SharedPreferences*/,\n                            \"MY_KEY\"            /* preference key */, \n                            2                   /* default value in case the preference was not found */);\nand the value(s) will be presented in a List\\\u003cFloat\\\u003e object.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiavash79%2Frangesliderpreference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiavash79%2Frangesliderpreference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiavash79%2Frangesliderpreference/lists"}