{"id":13604775,"url":"https://github.com/shuhart/StepView","last_synced_at":"2025-04-12T02:31:37.986Z","repository":{"id":42187129,"uuid":"108821022","full_name":"shuhart/StepView","owner":"shuhart","description":"A simple animated step view for Android","archived":true,"fork":false,"pushed_at":"2023-04-18T06:41:29.000Z","size":1927,"stargazers_count":902,"open_issues_count":26,"forks_count":154,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-08-01T19:36:18.700Z","etag":null,"topics":["animated-steps","step","steps","stepview"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/shuhart.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}},"created_at":"2017-10-30T08:16:23.000Z","updated_at":"2024-07-26T07:01:22.000Z","dependencies_parsed_at":"2024-01-16T23:30:09.222Z","dependency_job_id":"eefd45d5-aee5-44c9-819a-d83579de06e8","html_url":"https://github.com/shuhart/StepView","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhart%2FStepView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhart%2FStepView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhart%2FStepView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuhart%2FStepView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuhart","download_url":"https://codeload.github.com/shuhart/StepView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223489647,"owners_count":17153794,"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":["animated-steps","step","steps","stepview"],"created_at":"2024-08-01T19:00:51.119Z","updated_at":"2024-11-07T09:30:58.666Z","avatar_url":"https://github.com/shuhart.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"StepView\n======================\n\nA simple animated step view for Android. Backward and forward animations is supported.\n\nUsage\n-----\n\n1. Add mavenCentral() to repositories block in your gradle file.\n2. Add `implementation 'com.github.shuhart:stepview:1.5.1'` to your dependencies.\n3. Add `StepView` into your layouts or view hierarchy.\n\nSupported animations:\n\nName| Preview\n-------- | ---\n`ANIMATION_LINE`| ![animation_line](/images/animation_line.gif)\n`ANIMATION_CIRCLE`| ![animation_circle](/images/animation_circle.gif)\n`ANIMATION_ALL`| ![animation_all](/images/animation_all.gif)\n`ANIMATION_NONE`| ![animation_none](/images/animation_none.gif)\n`ANIMATION_ALL and all next circles enabled`| ![animation_circles](/images/animation_circles.gif)\n\nIn ANIMATION_CIRCLE and ANIMATION_NONE examples the line color remains the same. You can achieve this by specifying:\n``` app:doneStepLineColor=\"@color/stepview_line_next\" ```\n\nUsage:\n\nSpecify steps with xml attribute:\n```xml\n\tapp:steps=\"@array/steps\"\n```\n```java\n\tstepView.setSteps(List\u003cString\u003e steps);\n```\n\nOr Specify numbers of steps so that only circles with step number are shown:\n\n```xml\n\tapp:stepsNumber=\"4\"\n```\n```java\n\tstepView.setStepsNumber(4);\n```\n\n\u003cimg src=\"/images/no_text.png\"/\u003e\n\n\nStyling:\n\n```xml\n\u003ccom.shuhart.stepview.StepView\n\tandroid:id=\"@+id/step_view\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"wrap_content\"\n\tandroid:padding=\"16dp\"\n\tapp:sv_selectedCircleColor=\"@color/colorAccent\"\n\tapp:sv_selectedTextColor=\"@color/colorAccent\"\n\tapp:sv_stepLineWidth=\"1dp\"\n\tapp:sv_stepPadding=\"4dp\"\n    app:sv_nextTextColor=\"@color/colorAccent\"\n\tapp:sv_nextStepLineColor=\"@color/colorAccent\"\n\tapp:sv_doneCircleColor=\"@color/colorAccent\"\n\tapp:sv_doneStepLineColor=\"@color/colorAccent\"\n\tapp:sv_doneCircleRadius=\"12dp\"\n\tapp:sv_selectedCircleRadius=\"12dp\"\n\tapp:sv_selectedStepNumberColor=\"@color/colorPrimary\"\n\tapp:sv_stepViewStyle=\"@style/StepView\"\n\tapp:sv_doneStepMarkColor=\"@color/colorPrimary\"\n\tapp:sv_stepNumberTextSize=\"12sp\"\n\tapp:sv_animationType=\"Line\"\n  app:sv_typeface=\"@font/roboto_italic\"/\u003e\n```\n\nor instantiate and setup it in runtime with handy state builder:\n\n```java\n    stepView.getState()\n            .selectedTextColor(ContextCompat.getColor(this, R.color.colorAccent))\n            .animationType(StepView.ANIMATION_CIRCLE)\n            .selectedCircleColor(ContextCompat.getColor(this, R.color.colorAccent))\n            .selectedCircleRadius(getResources().getDimensionPixelSize(R.dimen.dp14))\n            .selectedStepNumberColor(ContextCompat.getColor(this, R.color.colorPrimary))\n            // You should specify only stepsNumber or steps array of strings.\n            // In case you specify both steps array is chosen.\n            .steps(new ArrayList\u003cString\u003e() {{\n                add(\"First step\");\n                add(\"Second step\");\n                add(\"Third step\");\n            }})\n            // You should specify only steps number or steps array of strings.\n            // In case you specify both steps array is chosen.\n            .stepsNumber(4)\n            .animationDuration(getResources().getInteger(android.R.integer.config_shortAnimTime))\n            .stepLineWidth(getResources().getDimensionPixelSize(R.dimen.dp1))\n            .textSize(getResources().getDimensionPixelSize(R.dimen.sp14))\n            .stepNumberTextSize(getResources().getDimensionPixelSize(R.dimen.sp16))\n            .typeface(ResourcesCompat.getFont(context, R.font.roboto_italic))\n            // other state methods are equal to the corresponding xml attributes\n            .commit();\n```\n\nChange a step:\n```java\n    // Passing 'true' triggers an animation if enabled.\n    // Animation would run if a difference between current and next is 1.\n    stepView.go(step, true);\n```\n\nIf you want to mark last step with a done mark:\n```java\n\tstepView.done(true);\n```\nIf you want to allow going back after that, you should unmark the done state:\n```java\n\tstepView.done(false)\n```\n\nYou can set a step click listener:\n```java\n    stepView.setOnStepClickListener(new StepView.OnStepClickListener() {\n        @Override\n        public void onStepClick(int step) {\n            // 0 is the first step\n        }\n    });\n```\n\nSee the sample for additional details.\n\nIf you want a custom typeface you should add font files to the resource folder \"font\" and reference any in xml layout.\nAlternatively you can specify typeface using the state builder in your code. Look into the sample for additional details on that.\n\nYou can enable view to draw remained step circles with a specified color.\nIn xml:\n```xml\n\u003ccom.shuhart.stepview.StepView\n\tandroid:id=\"@+id/step_view\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"wrap_content\"\n\tandroid:padding=\"16dp\"\n\tapp:sv_nextStepCircleEnabled=\"true\"\n\tapp:sv_nextStepCircleColor=\"@color/gray\"/\u003e\n```\n\nIn java:\n```java\n    stepView.getState()\n        .nextStepCircleEnabled(isChecked)\n        .nextStepCircleColor(Color.GRAY)\n        .commit();\n```\n\nLicense\n=======\n\n    Copyright 2017 Bogdan Kornev.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuhart%2FStepView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuhart%2FStepView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuhart%2FStepView/lists"}