{"id":20301321,"url":"https://github.com/warkiz/tickseekbar","last_synced_at":"2025-04-09T18:23:00.321Z","repository":{"id":53891781,"uuid":"136181345","full_name":"warkiz/TickSeekBar","owner":"warkiz","description":"This is a custom SeekBar library on Android.","archived":false,"fork":false,"pushed_at":"2023-10-26T18:54:13.000Z","size":9433,"stargazers_count":240,"open_issues_count":23,"forks_count":52,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T12:02:12.073Z","etag":null,"topics":["android","seekbar"],"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/warkiz.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":"2018-06-05T13:26:24.000Z","updated_at":"2025-02-18T23:15:25.000Z","dependencies_parsed_at":"2024-11-14T19:02:31.434Z","dependency_job_id":null,"html_url":"https://github.com/warkiz/TickSeekBar","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/warkiz%2FTickSeekBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warkiz%2FTickSeekBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warkiz%2FTickSeekBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warkiz%2FTickSeekBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warkiz","download_url":"https://codeload.github.com/warkiz/TickSeekBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085903,"owners_count":21045235,"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","seekbar"],"created_at":"2024-11-14T16:25:20.575Z","updated_at":"2025-04-09T18:23:00.294Z","avatar_url":"https://github.com/warkiz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TickSeekBar\n\n[![DOWNLOAD](https://api.bintray.com/packages/warkiz/maven/tickseekbar/images/download.svg)](https://bintray.com/warkiz/maven/tickseekbar/_latestVersion)\n[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)\n\nThis is a customizable SeekBar library on Android. Also, If you need Indicator to show top of seek bar, please see [the other library](https://github.com/warkiz/IndicatorSeekBar). [  中文.md ](https://github.com/warkiz/TickSeekBar/blob/master/README_zh.md)\n\n\n## OverView\n\u003cimg src=\"https://github.com/warkiz/TickSeekBar/blob/master/gif/overview.png?raw=true\" width = \"392\" height = \"115\"/\u003e\n\n## Screenshot\n\n\u003cimg src=\"https://github.com/warkiz/TickSeekBar/blob/master/gif/continuous.gif?raw=true\" width = \"264\" height = \"464\"/\u003e\u003cimg src=\"https://github.com/warkiz/TickSeekBar/blob/master/gif/discrete.gif?raw=true\" width = \"264\" height = \"464\"/\u003e\u003cimg src=\"https://github.com/warkiz/TickSeekBar/blob/master/gif/custom.gif?raw=true\" width = \"264\" height = \"464\"/\u003e\n\n## Demo\n[download](https://github.com/warkiz/TickSeekBar/blob/master/apk/demo.apk)\n\n Scan QR code to download:\n\u003cimg src=\"https://github.com/warkiz/TickSeekBar/blob/master/gif/demo_qrcode.png?raw=true\" width = \"100\" height = \"100\"/\u003e\n\n## Setup\n\n```gradle\nimplementation 'com.github.warkiz.tickseekbar:tickseekbar:0.1.4'\n```\n\n## Usage\n#### xml\n\n```xml\n\u003ccom.warkiz.tickseekbar.TickSeekBar\n    android:id=\"@+id/listener\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    app:tsb_ticks_count=\"5\"\n    app:tsb_thumb_color=\"@color/colorAccent\"\n    app:tsb_thumb_size=\"16dp\"\n    app:tsb_show_tick_marks_type=\"oval\"\n    app:tsb_tick_marks_color=\"@color/colorAccent\"\n    app:tsb_tick_marks_size=\"8dp\"\n    app:tsb_show_tick_texts=\"above\"\n    app:tsb_tick_texts_color=\"@color/color_pink\"\n    app:tsb_tick_texts_size=\"13sp\"\n    app:tsb_track_background_color=\"@color/color_gray\"\n    app:tsb_track_background_size=\"2dp\"\n    app:tsb_track_progress_color=\"@color/color_blue\"\n    app:tsb_track_progress_size=\"3dp\" /\u003e\n```\n\n#### Java\n\n```Java\nTickSeekBar seekBar = TickSeekBar\n             .with(getContext())\n             .max(200)\n             .min(10.2f)\n             .progressValueFloat(true)\n             .progress(33)\n             .tickCount(7)\n             .showTickMarksType(TickMarkType.DIVIDER)\n             .tickMarksColor(getResources().getColor(R.color.color_blue))\n             .tickMarksSize(6)//dp\n             .tickTextsSize(13)//sp\n             .showTickTextsPosition(TextPosition.ABOVE)\n             .tickTextsColorStateList(getResources().getColorStateList(R.color.selector_tick_texts_3_color))\n             .thumbColor(Color.parseColor(\"#ff0000\"))\n             .thumbSize(14)\n             .trackProgressColor(getResources().getColor(R.color.colorAccent))\n             .trackProgressSize(4)\n             .trackBackgroundColor(getResources().getColor(R.color.color_gray))\n             .trackBackgroundSize(2)\n             .build();\n```\n\n## Custom section tracks color\nThe color of every block of seek bar can also be custom.\n\n```Java\nsectionSeekBar.customSectionTrackColor(new ColorCollector() {\n    @Override\n    public boolean collectSectionTrackColor(int[] colorIntArr) {\n        //the length of colorIntArray equals section count\n        colorIntArr[0] = getResources().getColor(R.color.color_blue, null);\n        colorIntArr[1] = getResources().getColor(R.color.color_gray, null);\n        colorIntArr[2] = Color.parseColor(\"#FF4081\");\n        ...\n        return true; //True if apply color , otherwise no change\n    }\n});\n```\n\n## Selector drawable\u0026color were supported\n\nYou can set the StateListDrawable or ColorStateList for the thumb, tickMarks;\nAlso, ColorStateList for tickTexts is supported, too. Usage's format acccording to:\n\nThumb selector drawable:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cselector xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003c!--this drawable is for thumb when pressing--\u003e\n    \u003citem android:drawable=\"@mipmap/ic_launcher_round\" android:state_pressed=\"true\" /\u003e\n    \u003c!--for thumb in normal--\u003e\n    \u003citem android:drawable=\"@mipmap/ic_launcher\" /\u003e\n\u003c/selector\u003e\n```\n\nThumb selector color:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cselector xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003c!--this color is for thumb which is at pressing status--\u003e\n    \u003citem android:color=\"@color/colorAccent\" android:state_pressed=\"true\" /\u003e\n    \u003c!--for thumb which is at normal status--\u003e\n    \u003citem android:color=\"@color/color_blue\" /\u003e\n\u003c/selector\u003e\n```\n\nTickMarks selector drawable：\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cselector xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003c!--this drawable is for tickMarks when pressing--\u003e\n    \u003citem android:drawable=\"@mipmap/ic_launcher_round\" android:state_selected=\"true\" /\u003e\n    \u003c!--for tickMarks in normal--\u003e\n    \u003citem android:drawable=\"@mipmap/ic_launcher\" /\u003e\n\u003c/selector\u003e\n```\n\nTickMarks selector color：\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cselector xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003c!--this color is for marks those are at left side of thumb--\u003e\n    \u003citem android:color=\"@color/colorAccent\" android:state_selected=\"true\" /\u003e\n    \u003c!--for marks those are at right side of thumb--\u003e\n    \u003citem android:color=\"@color/color_gray\" /\u003e\n\u003c/selector\u003e\n```\n\nTickTexts selector color：\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cselector xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003c!--this color is for texts those are at left side of thumb--\u003e\n    \u003citem android:color=\"@color/colorAccent\" android:state_selected=\"true\" /\u003e\n    \u003c!--for tick text which is stopped under thumb --\u003e\n    \u003citem android:color=\"@color/color_blue\" android:state_hovered=\"true\" /\u003e\n    \u003c!--for texts those are at right side of thumb--\u003e\n    \u003citem android:color=\"@color/color_gray\" /\u003e\n\u003c/selector\u003e\n```\n\n## Listener\n```Java\nseekBar.setOnSeekChangeListener(new OnSeekChangeListener() {\n        @Override\n        public void onSeeking(SeekParams seekParams) {\n            Log.i(TAG, seekParams.seekBar);\n            Log.i(TAG, seekParams.progress);\n            Log.i(TAG, seekParams.progressFloat);\n            Log.i(TAG, seekParams.fromUser);\n            //when tick count \u003e 0\n            Log.i(TAG, seekParams.thumbPosition);\n            Log.i(TAG, seekParams.tickText);\n        }\n\n        @Override\n        public void onStartTrackingTouch(TickSeekBar seekBar) {\n        }\n\n        @Override\n        public void onStopTrackingTouch(TickSeekBar seekBar) {\n        }\n\n});\n```\n\n## Proguard\n\n``` groovy\n-dontwarn com.warkiz.tickseekbar.**\n```\n\n## Attributes\n\n[ attr.xml ](https://github.com/warkiz/TickSeekBar/blob/master/tickseekbar/src/main/res/values/attr.xml)\n\n## Support \u0026 Contact me\n\n感谢：\n自从在文档里公布了二维码，我收到国内的朋友的一些打赏，虽然金额不大，但是一些支持和鼓励的话语还是让我感到开心，非常感谢。\n\n感谢所有之前支持我的朋友。如果下次你要给我打赏，可以顺带写上你的github地址，我会在这里用链接贴出来，算是相互鼓励。\n\n感谢你们的支持。\n\n\n\u003cimg src=\"https://github.com/warkiz/IndicatorSeekBar/blob/master/app/src/main/res/mipmap-xxhdpi/alipay.png?raw=true\" width = \"400\" height = \"531\"/\u003e\u003cimg src=\"https://github.com/warkiz/IndicatorSeekBar/blob/master/app/src/main/res/mipmap-xxhdpi/wechat_pay.png?raw=true\" width = \"387\" height = \"531\"/\u003e\n\nFeel free to contact me if you have any trouble on this project:\n1. Create an issue.\n2. Send mail to me, \"warkiz\".concat(\"4j\").concat(\"@\").concat(\"gmail.com\")\n\n## License\n\n\tCopyright (C) 2017 zhuangguangquan warkiz\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n\tUnless required by applicable law or agreed to in writing, software\n\tdistributed under the License is distributed on an \"AS IS\" BASIS,\n\tWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\tSee the License for the specific language governing permissions and\n\tlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarkiz%2Ftickseekbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarkiz%2Ftickseekbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarkiz%2Ftickseekbar/lists"}