{"id":21130224,"url":"https://github.com/devadvance/circularseekbar","last_synced_at":"2025-07-09T01:32:49.902Z","repository":{"id":10904952,"uuid":"13200909","full_name":"devadvance/circularseekbar","owner":"devadvance","description":"Custom circular SeekBar (Circle, Semi-circle, and Ellipse) View/Widget for Android","archived":false,"fork":false,"pushed_at":"2017-10-07T03:39:03.000Z","size":55,"stargazers_count":463,"open_issues_count":26,"forks_count":136,"subscribers_count":21,"default_branch":"master","last_synced_at":"2023-11-07T15:17:31.131Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devadvance.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}},"created_at":"2013-09-29T22:12:33.000Z","updated_at":"2023-09-14T15:58:37.000Z","dependencies_parsed_at":"2022-09-23T06:40:39.934Z","dependency_job_id":null,"html_url":"https://github.com/devadvance/circularseekbar","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devadvance%2Fcircularseekbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devadvance%2Fcircularseekbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devadvance%2Fcircularseekbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devadvance%2Fcircularseekbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devadvance","download_url":"https://codeload.github.com/devadvance/circularseekbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476372,"owners_count":17480215,"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-11-20T05:32:26.610Z","updated_at":"2024-11-20T05:32:34.720Z","avatar_url":"https://github.com/devadvance.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"CircularSeekBar\n===============\n\n\u003ch2\u003eAndroid CircularSeekBar Custom View/Widget\u003c/h2\u003e\n\nThis is a custom circular SeekBar. It can be used to create SeekBars that are:\n\n-Full Circles\n\n-Semi-Circles\n\n-Ellipses\n\n-Semi-Ellipses\n\n\nIn addition, it is fully customizable via XML attributes, far beyond the default values.\n\n\u003ch2\u003eSupport and Testing\u003c/h2\u003e\n\nTested and working on Android 2.3+.\n\nTested on the following devices:\n\n-HTC One Google Edition (Android 4.3)\n\n-HTC One X (AT\u0026T, Android 4.1)\n\n-Galaxy Nexus (Android 4.3)\n\n-Emulator with Android versions 2.3-4.2.\n\nCircularSeekBar has also been tested with normal scrolling. It was also been tested successfully with Fragments, as well as scrolling tabs + Fragments.\n\n\nKnown Issues:\n-The glow effect around the progress part of the circle will not show up on Android 4.0+. This is due to the BlurMaskFilter not working when hardware acceleration is on. Android OS issue.\n\n![Screenshot 1](https://lh3.googleusercontent.com/-1JEeXRNfhYc/Ukiy_myxcoI/AAAAAAAAJD0/k8nGDGxfg7k/w281-h500-no/1.png)\n\n\u003ch2\u003eDocumentation\u003c/h2\u003e\nIn order to use the CircularSeekBar, you need to do three things.\n\n\u003ch3\u003e1) Add Source Files to Project\u003c/h3\u003e\n\nThere are two files you need to include:\n-CircularSeekBar.java\n-attrs.xml\n\nPlace the attrs.xml file inside of your res/values directory.\n\t\n\t../yourprojectdir/res/values/attrs.xml\n\nPlace CircularSeekBar.java inside of the src folder with the entire directory structure included:\n\n\t../yourprojectdir/src/com/devadvance/circularseekbar/CircularSeekBar.java\n\n\u003ch3\u003e2) Customize Source Files\u003c/h3\u003e\n\nTo use any methods inside if your classes, you must import the correct file. Add this to any classes you want to programmatically use the CircularSeekBar in:\n\n\timport com.devadvance.circularseekbar.CircularSeekBar;\n\nYou also need to add the import for the generated R class to the CircularSeekBar class. You need to change the top of the CircularSeekBar.java file to look like this:\n\n\tpackage com.devadvance.circularseekbar;\n\n\timport com.example.yourappname.R;\n\nwhere \u003cb\u003e\"com.example.yourappname\"\u003c/b\u003e depends on your project/app. Eclipse *may* offer to add this import for you.\n\n\n\u003ch3\u003e3) Add CircularSeekBar to Your Layout\u003c/h3\u003e\n\nStart by adding this to the root of your layout xml file(s):\n\n\txmlns:app=\"http://schemas.android.com/apk/res/com.devadvance.circulartest\"\n\nAfter you add it, the root of your layout xml file(s) should look SIMILAR to this:\n\n\t\u003cRelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t\txmlns:tools=\"http://schemas.android.com/tools\"\n\t\txmlns:app=\"http://schemas.android.com/apk/res/com.devadvance.circulartest\"\n\t\tandroid:layout_width=\"match_parent\"\n\t\tandroid:layout_height=\"match_parent\" \u003e\n\nTo add the basic CircularSeekBar to your layout, add this to your layout xml file(s) where desired:\n\n\t\u003ccom.devadvance.circularseekbar.CircularSeekBar\n\tandroid:id=\"@+id/circularSeekBar1\"\n\tandroid:layout_width=\"wrap_content\"\n\tandroid:layout_height=\"wrap_content\" /\u003e\n\nFor further configuration, such as color, sizes, and angle, you can specify many attributes associated with the CircularSeekBar, such as:\n\t\n\tapp:start_angle=\"270\"\n\tapp:end_angle=\"270\"\n\tapp:circle_x_radius=\"100\"\n\tapp:circle_y_radius=\"100\"\n\tapp:use_custom_radii=\"true\"\n\tapp:progress=\"25\"\n\tapp:max=\"100\"\n\tapp:pointer_alpha_ontouch=\"100\"\n\tapp:pointer_color=\"#0174DF\"\n\tapp:pointer_halo_color=\"#880174DF\"\n\n\u003cb\u003eNote: all sizes are measured in DEGREES or DP. No pixels are used.\u003c/b\u003e\n        \nYou can also change the standard Android view attributes, such as:\n\n\tandroid:layout_width=\"300dp\"\n\tandroid:layout_height=\"300dp\"\n\tandroid:layout_marginTop=\"100dp\"\n\tandroid:padding=\"0dp\"\n\nTo use the CircularSeekBar programmatically, you can treat it like a normal SeekBar inside of your code:\n\n\tCircularSeekBar seekbar = (CircularSeekBar) findViewById(R.id.circularSeekBar1);\n\tseekbar.getProgress();\n\tseekbar.setProgress(50);\n\nTo use the listener to detect progress changes, first add the import for the class at the top of your file:\n\t\n\timport com.devadvance.circularseekbar.CircularSeekBar.OnCircularSeekBarChangeListener;\n\nNext, create a listener that implements the OnCircularSeekBarChangeListener:\n\n\tpublic class CircleSeekBarListener implements OnCircularSeekBarChangeListener {\n\t\t@Override\n\t\tpublic void onProgressChanged(CircularSeekBar circularSeekBar, int progress, boolean fromUser) {\n\t\t\t// TODO Insert your code here\n\t\t\t\n\t\t}\n\t}\n\nThen create a new instance of it and set it for your seekbar:\n\n\tseekbar.setOnSeekBarChangeListener(new CircleSeekBarListener());\n\n\u003ch2\u003eAll Available Attributes\u003c/h2\u003e\n\nAvailable Attributes:\n\n\u003cb\u003eprogress\u003c/b\u003e - Integer Value.\n\n\u003cb\u003emax\u003c/b\u003e - Integer Value.\n\n\u003cb\u003emove_outside_circle\u003c/b\u003e - True/False. Default is false. In the case that the user has already touched down on the CircularSeekBar and is adjusting the progress, this determines whether or not movement outside the circle is accepted and adjusted the progress.\n\n\u003cb\u003estart_angle\u003c/b\u003e - Decimal Value. Start angle of the circle. Angles are relative to 3 o'clock (positive X axis).\n\n\u003cb\u003eend_angle\u003c/b\u003e - Decimal Value. End angle of the circle. Angles are relative to 3 o'clock (positive X axis).\n\n\u003cb\u003emaintain_equal_circle\u003c/b\u003e - True/False. Default is true. This controls whether or not an ellipse shape is available. Ellipses are not accurate in terms of representing progress, so be aware of that when you set this to false. Default value is true.\n\n\u003cb\u003euse_custom_radii\u003c/b\u003e - True/False. Default is false. If true, then you can specify radii using attributes. No matter what is specified, they will not exceed the bounds of the View itself. If false, then the View size (android:layout_width and android:layout_height) is used.\n\n\u003cb\u003elock_enabled\u003c/b\u003e - True/False. Default is true. If true, then the progress will \"stick\" to the start/end point. If false, it'll just pass through.\n\n\u003cb\u003ecircle_x_radius\u003c/b\u003e - Decimal Value. Custom X radius in DP.. Requires use_custom_radii to be true.\n\n\u003cb\u003ecircle_y_radius\u003c/b\u003e - Decimal Value. Custom Y radius in DP. Requires use_custom_radii to be true.\n\n\u003cb\u003ecircle_stroke_width\u003c/b\u003e - Decimal Value. Defines the width of the circle ring in DP.\n\n\u003cb\u003epointer_radius\u003c/b\u003e - Decimal Value. Defines the radius of the pointer in DP.\n\n\u003cb\u003epointer_halo_width\u003c/b\u003e - Decimal Value. Defines the width of the pointer halo in DP. Note: This is NOT a radius; it is in addition to the pointer radius.\n\n\u003cb\u003epointer_halo_border_width\u003c/b\u003e - Decimal Value. Defines the width of the pointer halo border in DP. Note: This is NOT a radius; it is in addition to the pointer radius. The border shows up when the user is touching the CircularSeekBar.\n\n\u003cb\u003ecircle_color\u003c/b\u003e - String value. Hex color value, can be #RRGGBB or #AARRGGBB (where AA is the alpha value).\n\n\u003cb\u003ecircle_progress_color\u003c/b\u003e - String value. Hex color value, can be #RRGGBB or #AARRGGBB (where AA is the alpha value).\n\n\u003cb\u003epointer_color\u003c/b\u003e - String value. Hex color value, can be #RRGGBB or #AARRGGBB (where AA is the alpha value).\n\n\u003cb\u003epointer_halo_color\u003c/b\u003e - String value. Hex color value, can be #RRGGBB or #AARRGGBB (where AA is the alpha value). If no alpha is included, it defaults to 200 (out of 255).\n\n\u003cb\u003epointer_alpha_ontouch\u003c/b\u003e - Integer value. When the user touches the CircularSeekBar, the opacity/alpha of the pointer halo changes to this value. Defaults to 100 (out of 255).\n\n\n\u003ch2\u003eAll Available Methods\u003c/h2\u003e\n\nThe methods available to View are all present, as well as some custom methods that allow customization programmatically:\n\n\u003cb\u003esetProgress\u003c/b\u003e and \u003cb\u003egetProgress\u003c/b\u003e\n\n\u003cb\u003esetMax\u003c/b\u003e and \u003cb\u003egetMax\u003c/b\u003e\n\n\u003cb\u003esetCircleColor\u003c/b\u003e and \u003cb\u003egetCircleColor\u003c/b\u003e\n\n\u003cb\u003esetCircleProgressColor\u003c/b\u003e and \u003cb\u003egetCircleProgressColor\u003c/b\u003e\n\n\u003cb\u003esetPointerColor\u003c/b\u003e and \u003cb\u003egetPointerColor\u003c/b\u003e\n\n\u003cb\u003esetPointerHaloColor\u003c/b\u003e and \u003cb\u003egetPointerHaloColor\u003c/b\u003e\n\n\u003cb\u003esetPointerAlpha\u003c/b\u003e and \u003cb\u003egetPointerAlpha\u003c/b\u003e\n\n\u003cb\u003esetPointerAlphaOnTouch\u003c/b\u003e and \u003cb\u003egetPointerAlphaOnTouch\u003c/b\u003e\n\n\u003cb\u003esetLockEnabled\u003c/b\u003e and \u003cb\u003eisLockEnabled\u003c/b\u003e\n\nNote: Changes made with these methods are persisted by saving state.\n\n\n\u003ch2\u003eLicense\u003c/h2\u003e\n\t\n \t Copyright 2013 Matt Joseph\n \t\n \t Licensed under the Apache License, Version 2.0 (the \"License\");\n \t you may not use this file except in compliance with the License.\n \t You may obtain a copy of the License at\n \t\n \t     http://www.apache.org/licenses/LICENSE-2.0\n \t\n \t Unless required by applicable law or agreed to in \twriting, software\n\t distributed under the License is distributed on an \"AS IS\" BASIS,\n \t WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, \teither express or implied.\n \t See the License for the specific language governing permissions and\n \t limitations under the License.\n \t\n \t\n\u003ch2\u003eInspired and Guided By\u003c/h2\u003e\n\nHoloCircleSeekBar - Copyright 2012 **Jesús Manzano**\n\nHoloColorPicker - Copyright 2012 **Lars Werkman (Designed by Marie Schweiz)**\n\nAlthough I did not used the code from either project directly, they were both used as reference material, and as a result, were extremely helpful.\n\n\u003ch2\u003eOther Screenshots\u003ch2\u003e\n![Screenshot 2](https://lh6.googleusercontent.com/-mq64-hEt_KM/Ukiy_swcllI/AAAAAAAAJD8/jy7pyKaFAaQ/w281-h500-no/2.png)\n\n![Screenshot 3](https://lh6.googleusercontent.com/-amwGemq-PDQ/Ukiy_rP832I/AAAAAAAAJEE/BjKuqqQVzeQ/w281-h500-no/3.png)\n\n![Screenshot 4](https://lh5.googleusercontent.com/-Mh-_AoEunxw/UkizAF-T5HI/AAAAAAAAJEI/tR0Sl5vCLVo/w281-h500-no/4.png)\n\nContent originally by: devadvance (\u003ca href=\"https://plus.google.com/115147267178456662187?rel=author\"\u003e+Matt Joseph\u003c/a\u003e)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevadvance%2Fcircularseekbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevadvance%2Fcircularseekbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevadvance%2Fcircularseekbar/lists"}