{"id":29180263,"url":"https://github.com/selimtoksal/quantitypicker","last_synced_at":"2025-07-01T19:08:25.419Z","repository":{"id":45910844,"uuid":"514939134","full_name":"selimtoksal/QuantityPicker","owner":"selimtoksal","description":"Compose QuantityPicker","archived":false,"fork":false,"pushed_at":"2022-07-17T20:51:45.000Z","size":3575,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T00:24:24.405Z","etag":null,"topics":["android","android-library","android-ui","jetpack-compose","jetpack-compose-library","quantity-picker"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/selimtoksal.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}},"created_at":"2022-07-17T19:40:33.000Z","updated_at":"2024-11-30T01:44:12.000Z","dependencies_parsed_at":"2022-09-02T19:50:57.707Z","dependency_job_id":null,"html_url":"https://github.com/selimtoksal/QuantityPicker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/selimtoksal/QuantityPicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selimtoksal%2FQuantityPicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selimtoksal%2FQuantityPicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selimtoksal%2FQuantityPicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selimtoksal%2FQuantityPicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selimtoksal","download_url":"https://codeload.github.com/selimtoksal/QuantityPicker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selimtoksal%2FQuantityPicker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263021819,"owners_count":23401148,"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","android-ui","jetpack-compose","jetpack-compose-library","quantity-picker"],"created_at":"2025-07-01T19:08:24.830Z","updated_at":"2025-07-01T19:08:25.398Z","avatar_url":"https://github.com/selimtoksal.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cimg src=\"images/quantity-picker-1.gif\" width=\"240\"/\u003e \u003cimg src=\"images/quantity-picker-2.gif\" width=\"240\"/\u003e\n\n## QuantityPicker\nQuantityPicker is compose component to add/remove anything\n\n## Installation\n- To implement **QuantityPicker** to your Android project via Gradle, you need to add JitPack repository to your root/project level build.gradle.\n```gradle\nallprojects {  \n repositories { ... maven { url 'https://jitpack.io' } }}  \n```\n- After adding JitPack repository, you can add **QuantityPicker** dependency to your app/module level build.gradle.\n```gradle\ndependencies {\n implementation 'com.github.selimtoksal:QuantityPicker:0.0.1'\n }\n```\n\n## Usage\nYou can add **QuantityPicker** wherever you want with your modifier\n\nquantityPickerShape attribute defines background of your **QuantityPicker** and border\n\n| Attribute | Type | Description |\n| --------- | ---- | ----------- |\n| modifier | Modifier | Compose modifier for QuantityPicker |\n| quantityTextModifier | Modifier | Compose modifier for quantity text. if you need background or custom modifier etc. |\n| textStyle | TextStyle | Text style for quantity text |\n| addIconResId | Int | Drawable for add button |\n| subtractIconResId | Int | Drawable for subtract button |\n| removeIconResId | Int | Drawable for remove button. Visible if it is null and current quantity is 1 |\n| quantityPickerShape | QuantityPickerShape | Background of all view also defines border if it is not null |\n| quantityData | QuantityData | Quantity values. It has min,max,current and postfix | \n| showLoading | Boolean | Loading state |\n| addIconContentDescription | String | contentDescription for add button |\n| subtractIconContentDescription | String | contentDescription for subtract button |\n| progressColor | Color | Color for loading progress indicator |\n| onAddClick | (() -\u003e Unit) | Listener for add button clicks |\n| onSubtractClick | (() -\u003e Unit) | Listener for subtract clicks |\n\n## Implementation\n\nIf you don't need any customization\n\n```kotlin\nQuantityPicker(\n    quantityData = quantityData,\n    addIconResId = R.drawable.ic_plus,\n    subtractIconResId = R.drawable.ic_minus,\n    removeIconResId = R.drawable.ic_remove,\n    showLoading = isLoading,\n    onAddClick = { },\n    onSubtractClick = { }\n)\n```\n\nIf you need background or custom modifier for quantity text and all view\n\n```kotlin\nQuantityPicker(\n    textStyle = Typography.body2,\n    quantityData = quantityData,\n    addIconResId = R.drawable.ic_plus,\n    subtractIconResId = R.drawable.ic_minus,\n    quantityPickerShape = QuantityPickerShape(\n        shape = RoundedCornerShape(50),\n        borderColor = MyQuantityPickerPrimaryColor,\n        borderWidth = 1.dp\n    ),\n    removeIconResId = R.drawable.ic_remove,\n    quantityTextModifier = Modifier\n        .background(\n            color = MyQuantityPickerPrimaryColor,\n            shape = CircleShape\n        )\n        .padding(vertical = 4.dp, horizontal = 8.dp),\n    showLoading = isLoading,\n    progressColor = MyQuantityPickerPrimaryColor,\n    onAddClick = { },\n    onSubtractClick = { }\n)\n```\n\n## Contribution\nFeel free to contribute\n\n## Inspired\nThis library is inspired by [QuantityPickerView in Trendyol android-ui-components](https://github.com/Trendyol/android-ui-components/tree/master/libraries/quantity-picker-view)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselimtoksal%2Fquantitypicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselimtoksal%2Fquantitypicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselimtoksal%2Fquantitypicker/lists"}