{"id":13643314,"url":"https://github.com/aliab/Two-Step-Picker-Dialog","last_synced_at":"2025-04-21T01:32:17.961Z","repository":{"id":147343458,"uuid":"81718704","full_name":"aliab/Two-Step-Picker-Dialog","owner":"aliab","description":"Two step wheel picker dialog for Android","archived":false,"fork":false,"pushed_at":"2018-05-27T09:07:21.000Z","size":160,"stargazers_count":272,"open_issues_count":0,"forks_count":24,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T15:42:27.142Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aliab.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}},"created_at":"2017-02-12T10:36:27.000Z","updated_at":"2024-09-20T02:57:57.000Z","dependencies_parsed_at":"2023-07-03T00:25:43.534Z","dependency_job_id":null,"html_url":"https://github.com/aliab/Two-Step-Picker-Dialog","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliab%2FTwo-Step-Picker-Dialog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliab%2FTwo-Step-Picker-Dialog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliab%2FTwo-Step-Picker-Dialog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliab%2FTwo-Step-Picker-Dialog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliab","download_url":"https://codeload.github.com/aliab/Two-Step-Picker-Dialog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249982605,"owners_count":21355732,"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:45.697Z","updated_at":"2025-04-21T01:32:17.509Z","avatar_url":"https://github.com/aliab.png","language":"Java","readme":"# Two Step Picker Dialog For Android\n[![](https://jitpack.io/v/aliab/Two-Step-Picker-Dialog.svg)](https://jitpack.io/#aliab/Two-Step-Picker-Dialog)\n\n![Hero Image](https://raw.githubusercontent.com/aliab/Two-Step-Picker-Dialog/master/screenshot/heroimage.jpg)\n\n## Description\n\nTwo step picker dialog for Android that helps you easily pick nested data on android.\n\n## Usage\n\nTo use two step picker dialog you must add it as a dependency in your Gradle build:\n\nStep 1. Add the JitPack repository to your build file\nAdd it in your root build.gradle at the end of repositories:\n\n```groovy\nallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url \"https://jitpack.io\" }\n\t\t}\n\t}\n```\nStep 2. Add the dependency\n```groovy\ndependencies {\n    implementation 'com.github.aliab:Two-Step-Picker-Dialog:V1.1.0'\n}\n```\n\nThen add the this to your java code:\n\n```java\n    new TwoStepPickerDialog\n                    .Builder(this)\n                    .withBaseData(baseData)\n                    .withStepData(stepData) // if you want to pass step data dynamically, don't pass it in builder\n                    .withOkButton(\"Get Me\")\n                    .withCancelButton(\"Cancel It\")\n                    .withBaseOnLeft(true) // if you want it RTL like, set it to false\n                    .withInitialBaseSelected(0)\n                    .withInitialStepSelected(0)\n                    .withOnStepDataRequested(new OnStepDataRequestedListener() {\n                        @Override\n                        public List\u003cString\u003e onStepDataRequest(int baseDataPos) {\n                            ... // return list of string base on your database/webservice ...\n                        }\n                    })\n                    .withDialogListener(new OnStepPickListener() {\n                        @Override\n                        public void onStepPicked(int step, int pos) {\n                            // get position of picked data\n                        }\n\n                        @Override\n                        public void onDismissed() {\n                            // know that user dismissed dialog\n                        }\n                    })\n                    .build();\n```\n\n\n## Public Builder Methods\n\n| Name | Description |\n|:----:|:----:|\n|withDialogListener(OnStepPickListener listener)| Get dialog actions |\n|withOkButton(String okButton)| Set dialog positive button string|\n|withCancelButton(String cancelButton)| Set dialog negative button string |\n|withBaseData(List\u003cString\u003e baseData)| Set Base data of picker|\n|withStepData(List\u003cList\u003cString\u003e\u003e stepData)| Set static data for steps - don't pass it if you implement OnStepDataRequestedListener|\n|withBaseOnLeft(boolean b)| If you want to show view RTL like, pass true|\n|withOnStepDataRequested(OnStepDataRequestedListener onStepDataRequestedListener)| Set in step picker listener for return dynamic data|\n|withInitialBaseSelected(int i);| Set selected base data item when dialog appears|\n|withInitialStepSelected(int i)| Set selected step data item when dialog appears|\n\n## Changelog\n\n### v1.1.0\n\n * Ability to choose initial value\n\n### v1.0.1\n\n * clean up manifest\n\n### v1.0.0\n\n * Initial release\n\n## License\n```\n   \nThe MIT License (MIT)\n\nCopyright (c) 2017 Ali Abdolahi\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```\n","funding_links":[],"categories":["选择器(Picker)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliab%2FTwo-Step-Picker-Dialog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliab%2FTwo-Step-Picker-Dialog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliab%2FTwo-Step-Picker-Dialog/lists"}