{"id":13396437,"url":"https://github.com/DanielMartinus/Stepper-Touch","last_synced_at":"2025-03-13T23:31:11.673Z","repository":{"id":48387088,"uuid":"85476181","full_name":"DanielMartinus/Stepper-Touch","owner":"DanielMartinus","description":"Stepper Touch for Android based on MaterialUp submission","archived":false,"fork":false,"pushed_at":"2023-07-31T17:16:15.000Z","size":728,"stargazers_count":685,"open_issues_count":8,"forks_count":83,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-16T12:44:22.707Z","etag":null,"topics":["android","library","spring","springanimator","stepper-touch","widget"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanielMartinus.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}},"created_at":"2017-03-19T12:59:43.000Z","updated_at":"2024-09-13T14:26:22.000Z","dependencies_parsed_at":"2024-01-31T23:52:44.460Z","dependency_job_id":null,"html_url":"https://github.com/DanielMartinus/Stepper-Touch","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartinus%2FStepper-Touch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartinus%2FStepper-Touch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartinus%2FStepper-Touch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielMartinus%2FStepper-Touch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielMartinus","download_url":"https://codeload.github.com/DanielMartinus/Stepper-Touch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221421542,"owners_count":16817827,"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","spring","springanimator","stepper-touch","widget"],"created_at":"2024-07-30T18:00:51.581Z","updated_at":"2024-10-25T11:30:35.963Z","avatar_url":"https://github.com/DanielMartinus.png","language":"Kotlin","readme":"# ⚠️ This repository is no longer maintained \n\n\n# Stepper-Touch\n\n\n[![Twitter](https://img.shields.io/badge/Twitter-@dionsegijn-blue.svg?style=flat)](http://twitter.com/dionsegijn) ![API](https://img.shields.io/badge/API-16%2B-blue.svg?style=flat) [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![CircleCI](https://circleci.com/gh/DanielMartinus/Stepper-Touch/tree/master.svg?style=svg)](https://circleci.com/gh/DanielMartinus/Stepper-Touch/tree/master)\n\n**For more updates** on this and other open-source projects, follow me on twitter 👉 [here](https://twitter.com/DionSegijn)\n\n---\n\nStepper Touch for Android based on a Material Up showcase designed by [Oleg Frolov](https://material.uplabs.com/posts/stepper-touch-interface)\n\nIn the latest version of the support library (25.3.0) a new class SpringAnimation was made available. I wanted to test this out and not long after that I found Stepper Touch, a concept made in FramerJS, on Material Up. I took this oppertunity to play with SpringAnimations.\n\n[\u003cimg src=\"media/demo.gif\" width=\"300\" /\u003e]()\n\nTry it yourself:\n\n[\u003cimg src=\"media/google-play-badge.png\" width=\"250\" /\u003e](https://play.google.com/store/apps/details?id=nl.dionsegijn.steppertouchdemo)\n\n## Gradle\n\n* Step 1. Add the JitPack repository to your build file\n\n```gradle\nallprojects {\n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n* Step 2. Add the dependency (only for androidx projects)\n\n```gradle\ndependencies {\n    implementation 'com.github.DanielMartinus:Stepper-Touch:1.0.1'\n}\n```\n\nIf you haven't migrated your project to **AndroidX** use:\n```gradle\ndependencies {\n    implementation 'com.github.DanielMartinus:Stepper-Touch:0.6'\n}\n```\n\n\nMore info about it here: [#24](https://github.com/DanielMartinus/Stepper-Touch/issues/24)\n\n## Implement\n\n```XML\n\u003cnl.dionsegijn.steppertouch.StepperTouch\n        android:id=\"@+id/stepperTouch\"\n        android:layout_width=\"100dp\"\n        android:layout_height=\"40dp\" /\u003e\n```\n\n### Kotlin\n\n```Kotlin\nval stepperTouch = findViewById\u003cStepperTouch\u003e(R.id.stepperTouch)\nstepperTouch.minValue = 0\nstepperTouch.minValue = 10\nstepperTouch.sideTapEnabled = true\nstepperTouch.addStepCallback(object : OnStepCallback {\n\toverride fun onStep(value: Int, positive: Boolean) {\n    \t\tToast.makeText(applicationContext, value.toString(), Toast.LENGTH_SHORT).show()\n\t}\n})\n```\n\n### Java\n\n```Java\nStepperTouch stepperTouch = findViewById(R.id.stepperTouch);\nstepperTouch.setMinValue(0);\nstepperTouch.setMaxValue(3);\nstepperTouch.setSideTapEnabled(true);\nstepperTouch.addStepCallback(new OnStepCallback() {\n    @Override\n    public void onStep(int value, boolean positive) {\n        Toast.makeText(getApplicationContext(), value + \"\", Toast.LENGTH_SHORT).show();\n    }\n});\n```\n\nYou're able to further customize or set initial values with styled attributes:\n\n1) Add res-auto to your xml layout if you haven't yet\n\n```XML\nxmlns:app=\"http://schemas.android.com/apk/res-auto\"\n```\n\n2) After that the following attributes will become available:\n\n```XML\napp:stepperBackgroundColor=\"\"\napp:stepperButtonColor=\"\"\napp:stepperActionsColor=\"\"\napp:stepperActionsDisabledColor=\"\"\napp:stepperTextColor=\"\"\napp:stepperTextSize=\"\"\napp:app:stepperAllowNegative=\"\"\napp:app:stepperAllowPositive=\"\"\n```\n","funding_links":[],"categories":["Index `(light-weight pages)`","Libraries","Index","\u003ca name=\"utility\"\u003e\u003c/a\u003eUtility \u003csup\u003e[Back ⇈](#contents)\u003c/sup\u003e","开源库"],"sub_categories":["Android","UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDanielMartinus%2FStepper-Touch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDanielMartinus%2FStepper-Touch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDanielMartinus%2FStepper-Touch/lists"}