{"id":20447209,"url":"https://github.com/stfalcon-studio/universalpickerdialog","last_synced_at":"2025-04-13T01:07:17.925Z","repository":{"id":140551041,"uuid":"66633886","full_name":"stfalcon-studio/UniversalPickerDialog","owner":"stfalcon-studio","description":"Android dialog with auto generated pickers inside, which depends on count of datasets provided. Made by Stfalcon","archived":false,"fork":false,"pushed_at":"2018-09-19T15:58:44.000Z","size":909,"stargazers_count":137,"open_issues_count":2,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-10T18:06:46.129Z","etag":null,"topics":["android","dialog","picker"],"latest_commit_sha":null,"homepage":"http://stfalcon.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/stfalcon-studio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-08-26T09:09:20.000Z","updated_at":"2025-01-07T06:09:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e2c89c5-3ad5-490a-8fae-f744d5d51ba9","html_url":"https://github.com/stfalcon-studio/UniversalPickerDialog","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/stfalcon-studio%2FUniversalPickerDialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stfalcon-studio%2FUniversalPickerDialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stfalcon-studio%2FUniversalPickerDialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stfalcon-studio%2FUniversalPickerDialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stfalcon-studio","download_url":"https://codeload.github.com/stfalcon-studio/UniversalPickerDialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650701,"owners_count":21139680,"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","dialog","picker"],"created_at":"2024-11-15T10:25:11.786Z","updated_at":"2025-04-13T01:07:17.920Z","avatar_url":"https://github.com/stfalcon-studio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UniversalPickerDialog\nCustomizable dialog with auto generated pickers inside that depend on the dataset count.\n\n![alt tag](images/picker_dialog_demo.gif)\n\n### Who we are\nNeed iOS and Android apps, MVP development or prototyping? Contact us via info@stfalcon.com. We develop software since 2009, and we're known experts in this field. Check out our [portfolio](https://stfalcon.com/en/portfolio) and see more libraries from [stfalcon-studio](https://stfalcon-studio.github.io/).\n\n### Download\n\nDownload via Gradle:\n```gradle\ncompile 'com.github.stfalcon:universalpickerdialog:0.1.0'\n```\n\nor Maven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.stfalcon\u003c/groupId\u003e\n  \u003cartifactId\u003euniversalpickerdialog\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.0\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n### Usage\n\nImplement callback interface:\n```java\npublic class MainActivity extends AppCompatActivity\n        implements View.OnClickListener, UniversalPickerDialog.OnPickListener {\n```\n\nThen implement OnPickListener.onPick(int[], int) method:\n```java\n@Override\npublic void onPick(int[] selectedValues, int key) {\n    String str = list.get(selectedValues[0]);\n    Object obj = array[selectedValues[0]];\n\n    /*do some logic*/\n}\n```\n\nNow you can build the dialog and show it. Just add these few lines:\n```java\nnew UniversalPickerDialog.Builder(this)\n                .setTitle(R.string.hello)\n                .setListener(this)\n                .setInputs(\n                        new UniversalPickerDialog.Input(0, list),\n                        new UniversalPickerDialog.Input(2, array)\n                )\n                .show();\n```\nData set is passing to Picker using Input class that supports lists as well as arrays, so no data conversion is required :)).\nIt takes in constructor default item position in carousel as the first argument and data set as the second.\n\nBuilder was extended by a many methods for more flexibility and convenience of use.\nHere's the full list (you can find the javadoc on each of these methods):\n```java\nnew UniversalPickerDialog.Builder(this)\n                .setTitle(R.string.hello)\n                .setTitle(\"Hello!\")\n                .setTitleColorRes(R.color.green)\n                .setTitleColor(Color.GREEN)\n                .setBackgroundColorRes(R.color.white)\n                .setBackgroundColor(Color.WHITE)\n                .setContentTextColorRes(R.color.green)\n                .setContentTextColor(Color.GREEN)\n                .setPositiveButtonText(R.string.yep)\n                .setPositiveButtonText(\"Yep!\")\n                .setNegativeButtonText(R.string.nope)\n                .setNegativeButtonText(\"Nope!\")\n                .setButtonsColor(R.color.green)\n                .setButtonsColorRes(Color.GREEN)\n                .setPositiveButtonColorRes(R.color.green)\n                .setPositiveButtonColor(Color.GREEN)\n                .setNegativeButtonColorRes(R.color.red)\n                .setNegativeButtonColor(Color.RED)\n                .setContentTextSize(16)\n                .setListener(this)\n                .setInputs(\n                        new UniversalPickerDialog.Input(2, list),\n                        new UniversalPickerDialog.Input(0, array)\n                )\n                .setKey(123)\n                .build()\n                .show();\n```\n\nTake a look at the [sample project](https://github.com/stfalcon-studio/UniversalPickerDialog/tree/master/sample) for more information.\n\n### License\n\n```\nCopyright (C) 2017 stfalcon.com\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstfalcon-studio%2Funiversalpickerdialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstfalcon-studio%2Funiversalpickerdialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstfalcon-studio%2Funiversalpickerdialog/lists"}